Video recording detection method, device and equipment and computer readable storage medium

By calculating the intersection-union ratio of the target in multiple consecutive frames of video, the number of times the recording device appears is automatically tracked, solving the problems of low accuracy and high cost in existing recording detection technologies, and achieving efficient and accurate recording behavior detection.

CN116137071BActive Publication Date: 2026-01-02BOE TECHNOLOGY GROUP CO LTD +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310142716.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-08
Publication Date
2026-01-02
Estimated Expiration
2043-02-08

AI Technical Summary

Technical Problem

Existing technologies for video recording and detection have low accuracy, high cost, and low efficiency, and rely on manual review of video content.

Method used

The system determines the initial video frame from multiple consecutive frames, calculates the target intersection-over-union ratio (IoU), and performs video tracking based on IoU exceeding a reference threshold. It also counts the number of times the recording device appears and automatically determines whether recording behavior exists in the video content.

Benefits of technology

It improves the accuracy and efficiency of video recording and detection, reduces manual intervention, saves time, and improves the overall accuracy of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116137071B_ABST
    Figure CN116137071B_ABST
Patent Text Reader

Abstract

The application discloses a video recording detection method and device, equipment and a computer readable storage medium, and belongs to the technical field of image processing. The method comprises the following steps: acquiring a plurality of continuous video pictures included in a video to be subjected to video recording detection; determining an initial video picture in the plurality of video pictures, wherein the initial video picture is a video picture of a video recording device in which a target part and a target mode first appear; determining a target intersection ratio between a detection frame of the video recording device in the target mode and a detection frame of the target part in the initial video picture; based on the target intersection ratio being greater than a reference threshold, processing video pictures other than the initial video picture in the plurality of video pictures to obtain a target occurrence number of the video recording device in the target mode in the video; and determining whether the content of the video includes a video recording behavior according to the target occurrence number. The method improves the efficiency and accuracy of video recording detection.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to the technical field of image processing, in particular to a video recording detection method and device, equipment and a computer readable storage medium. BACKGROUND

[0002] Video recording refers to photography or video recording. In some scenarios, a user does not want to be video recorded, and therefore, a video recording detection method is needed to determine whether a video recording behavior exists.

[0003] In related technologies, a video recording detection method is used to determine whether a video recording behavior exists in the content of a video by manually checking the video. However, this method relies on the subjective consciousness of a human being, and therefore, the accuracy of video recording detection is low. Moreover, the manual checking method makes the cost of video recording detection high and the efficiency low. SUMMARY

[0004] Embodiments of the present application provide a video recording detection method, device, equipment and computer readable storage medium, which can be used to solve the problem of low accuracy, high cost and low efficiency of video recording detection in related technologies. The technical solution is as follows:

[0005] In one aspect, the present application provides a video recording detection method, which comprises the following steps:

[0006] Obtaining a plurality of continuous video frames included in a video to be detected for video recording;

[0007] Determining an initial video frame in the plurality of video frames, the initial video frame being a video frame of a video recording device in a target form and target part for the first time;

[0008] Determining a target IoU between a detection frame of the video recording device in the target form and a detection frame of the target part in the initial video frame;

[0009] Processing video frames other than the initial video frame in the plurality of video frames based on the target IoU being greater than a reference threshold, to obtain a target occurrence number of the video recording device in the target form in the video;

[0010] Determining whether a video recording behavior exists in the content of the video according to the target occurrence number.

[0011] In one possible implementation, the processing of the video frames other than the initial video frame in the plurality of video frames to obtain the target occurrence number of the video recording device in the target form in the video comprises:

[0012] According to a target number of frames of video pictures in the plurality of frames of video pictures, an initial matrix is obtained, the initial matrix including sub-matrices of the target number of frames of video pictures, a sub-matrix of any video picture being used to indicate position information of a detection box of a camera device containing the target appearance in the any video picture, the target number of frames of video pictures being the target number of continuous frames of video pictures starting from the initial video picture;

[0013] First position information of a detection box of a camera device containing the target appearance in a first video picture is obtained, the first video picture being a video picture that appears continuously after the target number of frames of video pictures in the plurality of frames of video pictures;

[0014] According to a plurality of sub-matrices included in the initial matrix, position information of a detection box of a camera device containing the target appearance in a video picture corresponding to each sub-matrix is obtained, to obtain a plurality of second position information;

[0015] According to the first position information and the plurality of second position information, a first occurrence number of the camera device of the target appearance between the initial video picture and the first video picture is obtained.

[0016] According to the initial matrix and the first occurrence number, a target occurrence number of the camera device of the target appearance in the video is determined.

[0017] In a possible implementation, the obtaining, according to the first position information and the plurality of second position information, of the first occurrence number of the camera device of the target appearance between the initial video picture and the first video picture includes:

[0018] A first intersection-over-union ratio between the detection box determined by the first position information and detection boxes determined by the plurality of second position information is determined, to obtain a target number of first intersection-over-union ratios;

[0019] A first number of first intersection-over-union ratios greater than a target threshold value in the target number of first intersection-over-union ratios is determined.

[0020] Based on the first number being greater than a number threshold value, a first numerical value is taken as the first occurrence number of the camera device of the target appearance between the initial video picture and the first video picture.

[0021] Based on the first number not being greater than the number threshold value, a second numerical value is taken as the first occurrence number of the camera device of the target appearance between the initial video picture and the first video picture, the second numerical value being less than the first numerical value.

[0022] In a possible implementation, the determining, according to the initial matrix and the first occurrence number, of a target occurrence number of the target appearance of the camera device in the video includes:

[0023] updating the initial matrix according to the sub-matrix of the first video frame to obtain a target matrix, the target matrix including the sub-matrix of the first video frame;

[0024] obtaining third position information of a detection frame containing the target appearance of the camera device in a second video frame, the second video frame being a video frame adjacent to the first video frame and after the first video frame;

[0025] obtaining, according to a plurality of sub-matrices included in the target matrix, position information of the detection frame containing the target appearance of the camera device in a video frame corresponding to each sub-matrix to obtain a plurality of fourth position information;

[0026] updating the first occurrence number according to the third position information and the plurality of fourth position information to obtain a second occurrence number of the target appearance of the camera device between the initial video frame and the second video frame;

[0027] iterating the video frames other than the target number of video frames, the first video frame and the second video frame according to the updating process to obtain the target occurrence number of the target appearance of the camera device in the video.

[0028] In a possible implementation, the updating, according to the sub-matrix of the first video frame, of the initial matrix to obtain a target matrix includes:

[0029] deleting the sub-matrix of the initial video frame in the initial matrix to obtain a reference matrix;

[0030] obtaining the target matrix according to the reference matrix and the sub-matrix of the first video frame.

[0031] In a possible implementation, the updating, according to the third position information and the plurality of fourth position information, of the first occurrence number to obtain a second occurrence number of the target appearance of the camera device between the initial video frame and the second video frame includes:

[0032] determining a second intersection-over-union between the detection frame determined by the third position information and the detection frames determined by the plurality of fourth position information to obtain a target number of second intersection-overs;

[0033] determining a second number of second intersection-overs greater than a target threshold in the target number of second intersection-overs.

[0034] According to the second number, the first occurrence number is updated to obtain a second occurrence number of the target modality camera in a period from the initial video frame to the second video frame.

[0035] In a possible implementation, the updating of the first occurrence number according to the second number to obtain the second occurrence number of the target modality camera in the period from the initial video frame to the second video frame includes:

[0036] According to the second number, the first occurrence number is updated to obtain a reference number;

[0037] Reference position information of a detection box of the target modality camera in a reference video frame is obtained, the reference video frame being a video frame that is before the second video frame and is separated from the second video frame by a target number of video frames;

[0038] A third IoU between the detection box determined by the reference position information and the detection box determined by the third position information is determined;

[0039] According to the third IoU, the reference number is adjusted to obtain the second occurrence number of the target modality camera in the period from the initial video frame to the second video frame.

[0040] In a possible implementation, the updating of the first occurrence number according to the second number to obtain the reference number includes:

[0041] Based on the second number being greater than a number threshold, a third value is added to the first occurrence number to obtain the reference number;

[0042] Based on the second number being not greater than the number threshold, a fourth value is added to the first occurrence number to obtain the reference number, the fourth value being less than the third value.

[0043] In a possible implementation, the adjusting of the reference number according to the third IoU to obtain the second occurrence number of the target modality camera in the period from the initial video frame to the second video frame includes:

[0044] Based on the third IoU being greater than a target threshold, the reference number is taken as the second occurrence number of the target modality camera in the period from the initial video frame to the second video frame;

[0045] add a fifth value on the basis of the reference number of times, to obtain a second number of times of the target modality of the camera and recorder device between the initial video frame and the second video frame.

[0046] In a possible implementation, the determining, according to the target number of times, whether the content of the video includes the camera and recorder behavior, includes:

[0047] based on the target number of times being greater than a number of times threshold and the third video frame including the target modality of the camera and recorder device and the target part, obtaining fifth position information of a detection box containing the target modality of the camera and recorder device and sixth position information of a detection box containing the target part in the third video frame, the third video frame being a last video frame detected in the plurality of video frames;

[0048] determining, according to the fifth position information and the sixth position information, a fourth intersection over union of the target modality of the camera and recorder device and the target part in the third video frame;

[0049] based on the fourth intersection over union being greater than an intersection over union threshold, determining that the content of the video includes the camera and recorder behavior.

[0050] In a possible implementation, after the determining, based on the fourth intersection over union being greater than an intersection over union threshold, that the content of the video includes the camera and recorder behavior, the method further includes:

[0051] adding a target mark at the position indicated by the fifth position information of the third video frame, the target mark being used to indicate that the target modality of the camera and recorder device exists at the position indicated by the fifth position information.

[0052] In another aspect, an embodiment of the present application provides a camera and recorder detection device, and the device includes:

[0053] an acquisition module, configured to acquire a plurality of continuous video frames included in a video to be subjected to camera and recorder detection;

[0054] a determination module, configured to determine an initial video frame in the plurality of video frames, the initial video frame being a video frame in which a target part and a target modality of a camera and recorder device first appear;

[0055] the determination module is further configured to determine a target intersection over union between a detection box containing the target modality of the camera and recorder device and a detection box containing the target part in the initial video frame.

[0056] a processing module, configured to process video pictures in the plurality of video pictures except the initial video picture based on the target intersection over union being greater than the reference threshold, to obtain a target occurrence number of the target modality of the video recording device in the video;

[0057] The determination module is further configured to determine whether the content of the video includes the video recording behavior according to the target occurrence number.

[0058] In a possible implementation, the processing module is configured to acquire an initial matrix according to a target number of video pictures in the plurality of video pictures, the initial matrix including a sub-matrix of the target number of video pictures, and the sub-matrix of any video picture being used to indicate position information of a detection box of the target modality of the video recording device in the any video picture, the target number of video pictures being a continuous target number of video pictures starting from the initial video picture;

[0059] acquire first position information of a detection box of the target modality of the video recording device in a first video picture, the first video picture being a video picture that appears continuously after the target number of video pictures in the plurality of video pictures;

[0060] acquire position information of the detection box of the target modality of the video recording device in video pictures corresponding to a plurality of sub-matrices included in the initial matrix according to the plurality of sub-matrices, to obtain a plurality of second position information;

[0061] acquire a first occurrence number of the target modality of the video recording device between the initial video picture and the first video picture according to the first position information and the plurality of second position information;

[0062] determine the target occurrence number of the target modality of the video recording device in the video according to the initial matrix and the first occurrence number.

[0063] In a possible implementation, the processing module is configured to determine a first intersection over union between the detection box determined by the first position information and detection boxes determined by the plurality of second position information, to obtain a target number of first intersection over unions;

[0064] determine a first number of first intersection over unions greater than a target threshold in the target number of first intersection over unions;

[0065] based on the first number being greater than a number threshold, set a first value as the first occurrence number of the target modality of the video recording device between the initial video picture and the first video picture;

[0066] determining a second number of occurrences of the target modality of the camera equipment between the initial video frame and the second video frame based on the first number being not greater than the number threshold, the second number being less than the first number.

[0067] In a possible implementation, the processing module is configured to update the initial matrix according to the sub-matrix of the first video frame to obtain a target matrix, and the target matrix includes the sub-matrix of the first video frame.

[0068] obtaining third position information of a detection frame containing the target modality of the camera equipment in a second video frame, the second video frame being a video frame adjacent to the first video frame and after the first video frame;

[0069] obtaining position information of the detection frame containing the target modality of the camera equipment in a video frame corresponding to each sub-matrix according to the plurality of sub-matrices included in the target matrix, to obtain a plurality of fourth position information;

[0070] updating the first number of occurrences according to the third position information and the plurality of fourth position information, to obtain a second number of occurrences of the target modality of the camera equipment between the initial video frame and the second video frame;

[0071] iterating through video frames in the video except for the target number of video frames, the first video frame and the second video frame according to the updating process to obtain a target number of occurrences of the target modality of the camera equipment in the video.

[0072] In a possible implementation, the processing module is configured to delete a sub-matrix of an initial video frame in the initial matrix to obtain a reference matrix.

[0073] obtaining the target matrix according to the reference matrix and the sub-matrix of the first video frame.

[0074] In a possible implementation, the processing module is configured to determine a second intersection-over-union ratio between the detection frame determined by the third position information and the detection frame determined by each of the plurality of fourth position information, to obtain a target number of second intersection-over-union ratios.

[0075] determining a second number of second intersection-over-union ratios greater than a target threshold in the target number of second intersection-over-union ratios.

[0076] updating the first number of occurrences according to the second number, to obtain a second number of occurrences of the target modality of the camera equipment between the initial video frame and the second video frame.

[0077] In a possible implementation, the processing module is configured to update the first occurrence number according to the second number to obtain a reference number.

[0078] obtain reference position information of a detection box of the target modality in a reference video frame, the reference video frame being a video frame that is before and spaced apart from the second video frame by a target number of video frames;

[0079] determine a third IoU between the detection box determined according to the reference position information and the detection box determined according to the third position information;

[0080] adjust the reference number according to the third IoU to obtain a second occurrence number of the target modality recording device between the initial video frame and the second video frame.

[0081] In a possible implementation, the processing module is configured to add a third value to the first occurrence number to obtain a reference number based on the second number being greater than a number threshold;

[0082] add a fourth value to the first occurrence number to obtain a reference number based on the second number being not greater than the number threshold, the fourth value being less than the third value.

[0083] In a possible implementation, the processing module is configured to take the reference number as a second occurrence number of the target modality recording device between the initial video frame and the second video frame based on the third IoU being greater than a target threshold;

[0084] add a fifth value to the reference number to obtain a second occurrence number of the target modality recording device between the initial video frame and the second video frame based on the third IoU being not greater than the target threshold.

[0085] In a possible implementation, the determining module is configured to, based on the target occurrence number being greater than a number threshold and the third video frame including the target modality recording device and the target part, obtain fifth position information of a detection box of the target modality recording device and sixth position information of a detection box of the target part in the third video frame, the third video frame being a last video frame for detection in the plurality of video frames;

[0086] determine a fourth IoU of the target modality recording device and the target part in the third video frame according to the fifth position information and the sixth position information;

[0087] determine that the content of the video includes the filming behavior based on the fourth intersection-over-union ratio being greater than the intersection-over-union ratio threshold.

[0088] In a possible implementation, the apparatus further includes:

[0089] an adding module, configured to add a target mark at a position indicated by fifth position information of the third video frame, the target mark being used to indicate that a filming device in the target form exists at the position indicated by the fifth position information.

[0090] In another aspect, an embodiment of the present application provides an electronic device, including a processor and a memory, the memory storing at least one program code, the at least one program code being loaded and executed by the processor to enable the electronic device to implement the filming detection method described above.

[0091] In another aspect, a computer-readable storage medium is also provided, the computer-readable storage medium storing at least one program code, the at least one program code being loaded and executed by a processor to enable a computer to implement the filming detection method described above.

[0092] In another aspect, a computer program or computer program product is also provided, the computer program or computer program product storing at least one computer instruction, the at least one computer instruction being loaded and executed by a processor to enable a computer to implement the filming detection method described above.

[0093] The technical solutions provided by the embodiments of the present application bring at least the following beneficial effects:

[0094] The technical solutions provided by the embodiments of the present application bring at least the following beneficial effects: BRIEF DESCRIPTION OF DRAWINGS

[0095] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0096] Figure 1 This is a schematic diagram of the implementation environment of a recording and detection method provided in an embodiment of this application;

[0097] Figure 2 This is a flowchart of a recording and detection method provided in an embodiment of this application;

[0098] Figure 3 This is a schematic diagram of a detection frame for a recording device that contains a target shape in the initial video frame and a detection frame for a target part in the initial video frame, provided in an embodiment of this application.

[0099] Figure 4 This is a schematic diagram of another detection frame of a camera device containing a target shape in the initial video frame and a detection frame containing a target part in the initial video frame, provided in an embodiment of this application.

[0100] Figure 5 This is a flowchart of a recording and detection method provided in an embodiment of this application;

[0101] Figure 6 This is a schematic diagram of the structure of a recording and detection device provided in an embodiment of this application;

[0102] Figure 7 This is a schematic diagram of the structure of a server provided in an embodiment of this application;

[0103] Figure 8 This is a schematic diagram of the structure of a terminal device provided in an embodiment of this application. Detailed Implementation

[0104] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.

[0105] Figure 1 This is a schematic diagram of the implementation environment of a recording and detection method provided in an embodiment of this application, such as... Figure 1 As shown, the implementation environment includes an electronic device 101. The electronic device 101 can be a terminal device or a server; this embodiment does not limit its use. The electronic device 101 is used to execute the recording and detection method provided in this embodiment.

[0106] Optionally, based on the electronic device 101 being a terminal device, the terminal device is any kind of electronic device product capable of human-computer interaction with a user through one or more of a keyboard, a touchpad, a touch screen, a remote controller, voice interaction, or a handwriting device, for example, a PC (Personal Computer), a mobile phone, a smart phone, a PDA (Personal Digital Assistant), a wearable device, a PPC (Pocket PC), a tablet computer, a smart car machine, a smart television, a smart speaker, and the like. Based on the electronic device 101 being a server, the server can be a single server or a server cluster composed of multiple server units, and can also be a cloud computing service center. The terminal device and the server establish a communication connection through a wired network or a wireless network.

[0107] Those skilled in the art should understand that the terminal device and the server described above are only examples, and other existing or future terminal devices or servers, such as those applicable to the present application, should also be included in the protection scope of the present application and are hereby incorporated by reference.

[0108] The embodiment of the present application provides a video recording detection method, which can be applied to the above-mentioned implementation environment, so as to Figure 2 As shown in the flowchart of the video recording detection method provided by the embodiment of the present application, the method can be executed by the electronic device 101 in the Figure 1 As shown in the flowchart of the video recording detection method provided by the embodiment of the present application, the method can be executed by the electronic device 101 in the Figure 2 As shown in the flowchart of the video recording detection method provided by the embodiment of the present application, the method can be executed by the electronic device 101 in the

[0109] In step 201, the continuous multiple frames of video pictures included in the video to be detected for video recording are acquired.

[0110] In one possible implementation manner, the continuous multiple frames of video pictures included in the video to be detected for video recording are stored in the storage space of the electronic device, and the continuous multiple frames of video pictures included in the video to be detected for video recording are acquired from the storage space of the electronic device. The video to be detected for video recording can be a video that has been completed recording or a video that is being recorded, and the embodiment of the present application does not limit this.

[0111] Alternatively, the electronic device acquires the video to be detected for video recording, performs frame processing on the video to be detected for video recording, and obtains the continuous multiple frames of video pictures included in the video to be detected for video recording. The manner of acquiring the video to be detected for video recording includes but is not limited to the following four manners.

[0112] Manner one, a plurality of candidate videos are stored in the electronic device, and any one of the candidate videos is taken as the video to be detected for video recording.

[0113] The second mode is that the electronic device is a terminal device, and the terminal device stores a plurality of candidate videos. The selected candidate video is the video to be detected.

[0114] The third mode is that the electronic device is a server, and the server and the terminal device are connected through a wired network or a wireless network. The terminal device stores a plurality of candidate videos. The terminal device sends the selected candidate video to the server as the video to be detected.

[0115] The fourth mode is that the electronic device is a terminal device, and the terminal device installs and runs a first application program for video acquisition. The terminal device calls the first application program to acquire a video, and the acquired video is the video to be detected.

[0116] The first application program can be any application program capable of acquiring a video, and the embodiments of the present application do not limit the first application program. For example, the first application program is a camera. The acquired video can be a completed video or a video being acquired, and the embodiments of the present application do not limit the acquired video.

[0117] It should be noted that any of the above modes can be selected to obtain the video to be detected, and the embodiments of the present application do not limit the mode.

[0118] In a possible implementation, the electronic device installs and runs a second application program for video frame division. The second application program can be any program capable of performing video frame division, and the embodiments of the present application do not limit the second application program. For example, the second application program is a video editing software (Premiere Pro, PR). After the electronic device acquires the video to be detected, the electronic device calls the second application program to perform frame division on the video to be detected, to obtain a plurality of continuous video frames included in the video. For example, the video to be detected is frame-divided to obtain 7 continuous video frames included in the video.

[0119] In step 202, an initial video frame is determined in the plurality of video frames. The initial video frame is a video frame of the recording device in which the target part and the target form first appear.

[0120] The target part is a hand, and the target posture of the recording device refers to the recording device facing the lens, i.e., the initial video frame includes an image of the back of the recording device. The recording device can be any device capable of recording, and embodiments of the present application do not limit the recording device. For example, the recording device can be a mobile phone or a camera. For example, the recording device is a mobile phone, and the target posture of the recording device refers to the mobile phone facing the lens, i.e., the video frame includes an image of the back of the mobile phone.

[0121] In a possible implementation, the process of determining the initial video frame from the plurality of video frames includes: detecting each video frame to obtain video content included in each video frame; determining a video frame in which the video content includes the recording device and the target part from the plurality of video frames; classifying the recording device included in the video frame in which the video content includes the recording device and the target part to obtain a posture of the recording device included in the video frame in which the video content includes the recording device and the target part; and determining, as the initial video frame, the video frame in which the posture of the recording device included in the video frame in which the video content includes the recording device and the target part is the target posture and the video frame appears earliest in time.

[0122] The target detection network is called to detect each video frame to obtain video content included in each video frame. The target classification network is called to classify the recording device included in the video frame in which the video content includes the recording device and the target part to obtain a posture of the recording device included in the video frame in which the video content includes the recording device and the target part.

[0123] Before the target detection network is called, the target detection network needs to be obtained. The process of obtaining the target detection network includes: obtaining a first training data set and an initial detection network, the first training data set including a first image and image content included in the first image, the first image including an image of a recording device and an image of a target part, and the image content included in the first image including the recording device and the target part; and the initial detection network being any network capable of content detection, for example, the initial detection network being a YOLO (You Only Look Once) network. The initial detection network is trained according to the first training data set to obtain the target detection network.

[0124] Optionally, the process of training the initial detection network according to the first training data set to obtain the target detection network includes: performing data augmentation on the first image in the first training data set to obtain a first training data set after data augmentation, and training the initial detection network according to the first training data set after data augmentation to obtain the target detection network. The data augmentation on the first image includes, but is not limited to, random scaling, data normalization, image splicing, and the like.

[0125] Before calling the target classification network, the target classification network needs to be obtained first. The process of obtaining the target classification network includes: obtaining a second training data set and an initial classification network, and the second training data set includes a second image, a morphology of the second image, a third image and a morphology of the third image. Wherein, the second image and the third image are images of the recording device, the morphology of the second image is a front back, and the morphology of the third image is a non-front back. The initial classification network is any kind of network capable of content classification, and the initial classification network is exemplarily a residual neural network (Resnet). The initial classification network is trained according to the second training data set to obtain the target classification network. Optionally, according to the second training data set, the learning strategy of pre-training weight combined with fine-tuning is used to update the parameters of the initial classification network to obtain the target classification network.

[0126] Optionally, the process of training the initial classification network according to the second training data set to obtain the target classification network includes: when the number of the second image and the third image included in the second training data set is unbalanced, the second image and the third image are extracted from the second training data set by random sampling, and the number of the extracted second image and the third image is the same. The initial classification network is trained according to the extracted second image, the morphology of the extracted second image, the extracted third image and the morphology of the extracted third image to obtain the target classification network. The extracted second image and the extracted third image can also be data enhanced, and the initial classification network is trained according to the image after data enhancement, the morphology of the second image and the morphology of the third image to obtain the target classification network. Wherein, the way of data enhancement of the extracted second image and the extracted third image includes but is not limited to random cropping, random horizontal flipping, random vertical flipping, random Gaussian blur, scale zoom, left-right or up-down random zero padding, etc.

[0127] In step 203, the target intersection ratio between the detection frame of the recording device containing the target morphology and the detection frame containing the target part in the initial video frame is determined.

[0128] Optionally, the process of determining the target IoU between the detection box of the recording device containing the target morphology in the initial video picture and the detection box containing the target part in the initial video picture comprises: if there is an overlapping area between the detection box of the recording device containing the target morphology in the initial video picture and the detection box containing the target part in the initial video picture, determining a first area of the overlapping area between the detection box of the recording device containing the target morphology in the initial video picture and the detection box containing the target part in the initial video picture; determining a second area of a figure composed of the detection box of the recording device containing the target morphology in the initial video picture and the detection box containing the target part in the initial video picture; taking the ratio between the first area and the second area as the target IoU between the detection box of the recording device containing the target morphology in the initial video picture and the detection box containing the target part. If there is no overlapping area between the detection box of the recording device containing the target morphology in the initial video picture and the detection box containing the target part in the initial video picture, taking 0 as the target IoU between the detection box of the recording device containing the target morphology in the initial video picture and the detection box containing the target part.

[0129] As Figure 3 is a schematic diagram of the detection box of the recording device containing the target morphology in the initial video picture and the detection box containing the target part in the initial video picture provided by an embodiment of the present application. Wherein, 301 is the detection box of the recording device containing the target morphology in the initial video picture, and 302 is the detection box containing the target part in the initial video picture. Since there is an overlapping area between 301 and 302, Figure 3 the shaded area in is the overlapping area; therefore, taking the ratio between the area of the shaded area and the area of the figure composed of the detection box of the recording device containing the target morphology in the initial video picture and the detection box containing the target part in the initial video picture as the target IoU between the detection box of the recording device containing the target morphology in the initial video picture and the detection box containing the target part.

[0130] As Figure 4 is another schematic diagram of the detection box of the recording device containing the target morphology in the initial video picture and the detection box containing the target part in the initial video picture provided by an embodiment of the present application. Wherein, 401 is the detection box of the recording device containing the target morphology in the initial video picture, and 402 is the detection box containing the target part in the initial video picture. Since there is no overlapping area between 401 and 402, 0 is taken as the target IoU between the detection box of the recording device containing the target morphology in the initial video picture and the detection box containing the target part.

[0131] In step 204, based on the target IoU being greater than the reference threshold, the video pictures in the plurality of video pictures except the initial video picture are processed to obtain the target occurrence number of the recording device of the target morphology in the video.

[0132] In a possible implementation, the reference threshold is set based on experience or adjusted according to an implementation environment, which is not limited in the embodiments of the present application. The process of obtaining the target appearance number of the target-form camera device in the video by processing the video pictures other than the initial video picture in the plurality of video pictures includes: obtaining an initial matrix according to a target number of video pictures in the plurality of video pictures; obtaining a first appearance number of the target-form camera device between the initial video picture and the first video picture according to the first video picture and the initial matrix; and determining the target appearance number of the target-form camera device in the video according to the initial matrix and the first appearance number.

[0133] In the embodiments of the present application, the target number is set based on experience or adjusted according to the total number of video pictures included in the video, which is not limited in the embodiments of the present application. The target number is greater than zero and less than the total number of video pictures included in the video. The initial matrix includes a sub-matrix of the target number of video pictures, and the sub-matrix of any video picture is used to indicate the position information of the detection box of the target-form camera device in any video picture. The target number of video pictures is a continuous target number of video pictures starting from the initial video picture. The first video picture is a video picture that appears continuously after the target number of video pictures in the plurality of video pictures.

[0134] For example, the target number is 3, the initial video picture is the first video picture, the target number of video pictures is the first video picture, the second video picture and the third video picture, and the first video picture is the fourth video picture. For another example, the target number is 3, the initial video picture is the fourth video picture, the target number of video pictures is the fourth video picture, the fifth video picture and the sixth video picture, and the first video picture is the seventh video picture.

[0135] In a possible implementation, the process of obtaining the initial matrix according to the target number of video pictures in the plurality of video pictures includes: processing the target number of video pictures to obtain a sub-matrix corresponding to each of the target number of video pictures; and obtaining the initial matrix according to the sub-matrix corresponding to each of the target number of video pictures. Optionally, the sub-matrix corresponding to each of the target number of video pictures is stacked to obtain the initial matrix. The initial matrix records the target number of video pictures, which provides a basis for determining the appearance number of the camera device.

[0136] Optionally, the process of processing the target number of frames of video pictures to obtain the sub-matrix corresponding to each of the target number of frames of video pictures comprises: for any one of the target number of frames of video pictures, based on the fact that the any one of the frames of video pictures includes the recording device and the form of the recording device is the target form, taking a matrix corresponding to the position information of the detection box of the recording device with the target form as the sub-matrix corresponding to the any one of the frames of video pictures; based on the fact that the any one of the frames of video pictures includes the recording device and the form of the recording device is not the target form, or based on the fact that the any one of the frames of video pictures does not include the recording device, taking the first matrix as the sub-matrix corresponding to the any one of the frames of video pictures.

[0137] The first matrix is set based on experience or adjusted according to the implementation environment, which is not limited in the embodiments of the present application. For example, the first matrix is [0, 0, 0, 0]. The matrix corresponding to the position information of the detection box of the recording device with the target form is a matrix composed of the position information of the detection box of the recording device with the target form. The position information of the detection box of the recording device with the target form can be the position information of the top-left corner and the position information of the bottom-right corner of the detection box of the recording device with the target form, or the position information of the top-right corner and the position information of the bottom-left corner of the detection box of the recording device with the target form, or the position information of the center point, the length and the width of the detection box of the recording device with the target form, which is not limited in the embodiments of the present application. For example, the position information of the top-left corner of the detection box of the recording device with the target form is (X1, Y1), and the position information of the bottom-right corner is (X2, Y2), and the matrix composed of the position information of the detection box of the recording device with the target form is [X1, Y1, X2, Y2].

[0138] In a possible implementation, for any one of the target number of frames of video pictures, the any one of the frames of video pictures is detected to obtain video content included in the any one of the frames of video pictures; based on the fact that the video content included in the any one of the frames of video pictures includes the recording device, the recording device included in the any one of the frames of video pictures is classified to obtain the form of the recording device included in the any one of the frames of video pictures. The process is similar to the process of determining the initial video picture in step 202, which will not be described here.

[0139] Optionally, the process of obtaining, according to the first video picture and the initial matrix, the first occurrence number of the camera device of the target form between the initial video picture and the first video picture comprises: obtaining first position information of a detection box of the camera device of the target form in the first video picture; obtaining, according to a plurality of sub-matrices included in the initial matrix, position information of the detection box of the camera device of the target form in video pictures corresponding to each of the sub-matrices, to obtain a plurality of second position information; and obtaining, according to the first position information and the plurality of second position information, the first occurrence number of the camera device of the target form between the initial video picture and the first video picture.

[0140] The process of obtaining the first position information of the detection box of the camera device of the target form in the first video picture comprises: taking position information of the detection box of the camera device of the target form in the first video picture as the first position information. For example, position information of the top-left corner of the detection box of the camera device of the target form in the first video picture is (X1, Y1), and position information of the bottom-right corner is (X2, Y2), then (X1, Y1) and (X2, Y2) are taken as the first position information.

[0141] The process of obtaining, according to a plurality of sub-matrices included in the initial matrix, position information of the detection box of the camera device of the target form in video pictures corresponding to each of the sub-matrices, to obtain a plurality of second position information comprises: taking position information corresponding to any one of the sub-matrices in the initial matrix as the second position information. For example, one of the sub-matrices in the initial matrix is [X3, Y3, X4, Y4], then (X3, Y3) and (X4, Y4) are taken as the second position information of the detection box of the camera device of the target form in a video picture corresponding to the sub-matrix.

[0142] The process of obtaining, according to the first position information and the plurality of second position information, the first occurrence number of the camera device of the target form between the initial video picture and the first video picture comprises: determining a first intersection-over-union between the detection box determined by the first position information and detection boxes determined by the plurality of second position information, to obtain a target number of first intersection-overs-union; determining a first number of first intersection-overs-union greater than a target threshold value in the target number of first intersection-overs-union; taking a first value as the first occurrence number of the camera device of the target form between the initial video picture and the first video picture based on the first number being greater than a number threshold value; and taking a second value as the first occurrence number of the camera device of the target form between the initial video picture and the first video picture based on the first number not being greater than the number threshold value, the second value being less than the first value.

[0143] The target threshold, the number threshold, the first value and the second value are all set based on experience or adjusted according to an implementation environment, and embodiments of the present application do not limit this. Alternatively, the number threshold is determined based on the occurrence frequency and the target number, for example, the number threshold is the product of the occurrence frequency and the target number. The occurrence frequency is a measure of the frequency of the appearance of the target form in the continuous frames in the video in embodiments of the present application. The target threshold is used to measure the amplitude of the movement of the recording device allowed for the target form. The smaller the target threshold, the greater the amplitude of the movement of the recording device allowed for the target form, and vice versa. The target threshold is 80%, the number threshold is 2, the first value is 1, and the second value is 0, for example.

[0144] The process of determining the first intersection-over-union ratio between the detection frame determined by the first position information and the detection frames determined by the plurality of second position information includes: for any one of the plurality of second position information, if there is an overlapping area between the detection frame determined by the first position information and the detection frame determined by the any one of the second position information, determining a third area of the overlapping area between the detection frame determined by the first position information and the detection frame determined by the any one of the second position information; determining a fourth area of a figure composed of the detection frame determined by the first position information and the detection frame determined by the any one of the second position information; and taking the ratio between the third area and the fourth area as the first intersection-over-union ratio between the detection frame determined by the first position information and the detection frame determined by the any one of the second position information. If there is no overlapping area between the detection frame determined by the first position information and the detection frame determined by the any one of the second position information, 0 is taken as the first intersection-over-union ratio between the detection frame determined by the first position information and the detection frame determined by the any one of the second position information.

[0145] The method for determining the first occurrence number provided by embodiments of the present application, on the one hand, simulates the spatial characteristics of the recording behavior by judging the intersection-over-union ratio of the recording device between the first video frame and the target number of video frames, that is, the amplitude of the shaking of the recording device while keeping the recording device aligned with the camera is small, and on the other hand, the first occurrence number of the recording device is calculated by combining the first video frame and the target number of video frames, which utilizes the time characteristics of the video, so that the determination of the first occurrence number is more accurate. In addition, the judgment method of the information combination of the first video frame and the target number of video frames also increases the fault tolerance rate of detecting the loss of the recording device.

[0146] In a possible implementation, the process of determining the target number of occurrences of the target modality in the video according to the initial matrix and the first number of occurrences includes: updating the initial matrix according to the sub-matrix of the first video frame to obtain a target matrix, the target matrix including the sub-matrix of the first video frame; updating the first number of occurrences according to the second video frame and the target matrix to obtain a second number of occurrences of the target modality between the initial video frame and the second video frame; and traversing video frames other than the target number of video frames, the first video frame and the second video frame in the video according to the above updating process to obtain the target number of occurrences of the target modality in the video.

[0147] The second video frame is a video frame adjacent to the first video frame and following the first video frame. For example, the first video frame is the fourth video frame, and the second video frame is the fifth video frame.

[0148] Before the initial matrix is updated according to the sub-matrix of the first video frame, the sub-matrix of the first video frame needs to be obtained, and the process of obtaining the sub-matrix of the first video frame is similar to the process of obtaining the sub-matrix corresponding to each of the target number of video frames, which will not be described herein again.

[0149] Optionally, the process of updating the initial matrix according to the sub-matrix of the first video frame to obtain a target matrix includes: deleting the sub-matrix of the initial video frame in the initial matrix to obtain a reference matrix; and obtaining the target matrix according to the reference matrix and the sub-matrix of the first video frame. For example, the reference matrix and the sub-matrix of the first video frame are stacked to obtain the target matrix.

[0150] For example, the initial matrix includes the sub-matrix of the first video frame, the sub-matrix of the second video frame and the sub-matrix of the third video frame, and the first video frame is the initial video frame. Therefore, the sub-matrix of the first video frame in the initial matrix is deleted to obtain a reference matrix, and the reference matrix includes the sub-matrix of the second video frame and the sub-matrix of the third video frame. The reference matrix and the sub-matrix of the first video frame are stacked to obtain a target matrix, and the target matrix includes the sub-matrix of the second video frame, the sub-matrix of the third video frame and the sub-matrix of the fourth video frame (i.e., the sub-matrix of the first video frame).

[0151] Optionally, the process of updating the first occurrence number according to the second video picture and the target matrix to obtain the second occurrence number of the camera device in the target form between the initial video picture and the second video picture includes: obtaining third position information of a detection frame containing the camera device in the target form in the second video picture; obtaining position information of the detection frame containing the camera device in the target form in video pictures corresponding to a plurality of sub-matrices included in the target matrix to obtain a plurality of fourth position information; and updating the first occurrence number according to the third position information and the plurality of fourth position information to obtain the second occurrence number of the camera device in the target form between the initial video picture and the second video picture.

[0152] In a possible implementation, the process of obtaining the third position information is similar to the process of obtaining the first position information in the above steps, and the process of obtaining the plurality of fourth position information is similar to the process of obtaining the plurality of second position information in the above steps, which will not be repeated here.

[0153] Optionally, the process of updating the first occurrence number according to the third position information and the plurality of fourth position information to obtain the second occurrence number of the camera device in the target form between the initial video picture and the second video picture includes: determining a second intersection-over-union ratio between the detection frame determined by the third position information and detection frames determined by the plurality of fourth position information to obtain a target number of second intersection-over-union ratios; determining a second number of second intersection-over-union ratios greater than a target threshold in the target number of second intersection-over-union ratios; and updating the first occurrence number according to the second number to obtain the second occurrence number of the camera device in the target form between the initial video picture and the second video picture.

[0154] The process of determining the second intersection-over-union ratio between the detection frame determined by the third position information and the detection frames determined by the plurality of fourth position information is similar to the process of determining the first intersection-over-union ratio between the detection frame determined by the first position information and the detection frames determined by the plurality of second position information in the above steps, which will not be repeated here.

[0155] The embodiments of the present application do not limit the determination manner of updating the first occurrence number according to the second number to obtain the second occurrence number of the camera device in the target form between the initial video picture and the second video picture. Optionally, the first occurrence number is updated according to the second number in the following two implementation manners to obtain the second occurrence number of the camera device in the target form between the initial video picture and the second video picture.

[0156] In an implementation, based on the second number being greater than the number threshold, a third number is added to the first number of occurrences to obtain a second number of occurrences of the target type of camera and recording device between the initial video frame and the second video frame. Based on the second number being not greater than the number threshold, a reference number is added to the first number of occurrences to obtain the second number of occurrences of the target type of camera and recording device between the initial video frame and the second video frame.

[0157] The third number and the reference number are set based on experience or adjusted according to an implementation environment, and embodiments of the present application do not limit this. The reference number is less than the third number. For example, the third number is 1 and the reference number is -1.

[0158] In an implementation, the first number of occurrences is updated according to the second number to obtain a reference number, reference position information of the detection frame containing the target type of camera and recording device in a reference video frame is obtained, the reference video frame is a video frame that is before the second video frame and is separated from the second video frame by a target number of video frames, a third IoU between the detection frame determined by the reference position information and the detection frame determined by the third position information is determined, and the second number of occurrences of the target type of camera and recording device between the initial video frame and the second video frame is obtained by adjusting the reference number according to the third IoU.

[0159] Optionally, the target number of video frames is a fourth video frame, a fifth video frame, and a sixth video frame, the first video frame is a seventh video frame, and the second video frame is an eighth video frame. The reference video frame is the fifth video frame.

[0160] The process of updating the first number of occurrences to obtain the reference number according to the second number includes: based on the second number being greater than the number threshold, adding a third number to the first number of occurrences to obtain the reference number; and based on the second number being not greater than the number threshold, adding a fourth number to the first number of occurrences to obtain the reference number, the fourth number being less than the third number. The third number and the fourth number are set based on experience or adjusted according to an implementation environment, and embodiments of the present application do not limit this. For example, the third number is 1 and the fourth number is 0.

[0161] The process of determining the third IoU between the detection frame determined by the reference position information and the detection frame determined by the third position information is similar to the process of determining the first IoU between the detection frame determined by the first position information and the detection frames determined by the plurality of second position information in the above step, and will not be described here.

[0162] Optionally, the process of adjusting the reference number according to the third intersection-over-union ratio to obtain the second occurrence number of the target appearance of the camera device between the initial video frame and the second video frame includes: based on the third intersection-over-union ratio being greater than a target threshold, taking the reference number as the second occurrence number of the target appearance of the camera device between the initial video frame and the second video frame; and based on the third intersection-over-union ratio not being greater than the target threshold, adding a fifth numerical value to the reference number to obtain the second occurrence number of the target appearance of the camera device between the initial video frame and the second video frame.

[0163] The target threshold and the fifth numerical value are set based on experience or adjusted according to an implementation environment, and embodiments of the present application do not limit this. For example, the target threshold is 80%, and the fifth numerical value is -1.

[0164] It should be noted that the second occurrence number of the target appearance of the camera device between the initial video frame and the second video frame can be obtained by using any of the above implementation manners, and embodiments of the present application do not limit this.

[0165] It should be further noted that the process of determining the target occurrence number of the target appearance of the camera device in the video is similar to the process of determining the second occurrence number of the target appearance of the camera device between the initial video frame and the second video frame, and embodiments of the present application do not limit this.

[0166] In step 205, it is determined whether the content of the video includes the recording behavior according to the target occurrence number.

[0167] In one possible implementation manner, whether the content of the video includes the recording behavior is determined according to the target occurrence number in the following two implementation manners.

[0168] Implementation manner one: based on the target occurrence number being greater than a number threshold, it is determined that the content of the video includes the recording behavior; and based on the target occurrence number not being greater than the number threshold, it is determined that the content of the video does not include the recording behavior.

[0169] The number threshold is set based on experience or adjusted according to an implementation environment, and embodiments of the present application do not limit this. For example, the number threshold is 3.

[0170] Implementation manner two: based on the target occurrence number being greater than a number threshold and the third video frame including the target appearance of the camera device and the target part, fifth position information of a detection box containing the target appearance of the camera device in the third video frame and sixth position information of a detection box containing the target part are obtained; a fourth intersection-over-union ratio of the target appearance of the camera device and the target part in the third video frame is determined according to the fifth position information and the sixth position information; and based on the fourth intersection-over-union ratio being greater than an intersection-over-union ratio threshold, it is determined that the content of the video includes the recording behavior.

[0171] The third video picture is the last video picture in the plurality of video pictures for which detection is performed. The fourth IOI of the target modality and the target site in the third video picture is determined according to the fifth position information and the sixth position information. The process of determining the fourth IOI is similar to the process of determining the first IOI, and thus is not described herein again. The fourth IOI of the target modality and the target site in the third video picture is used to indicate the relative relationship between the target modality and the target site in the third video picture. The IOI threshold is set based on experience or adjusted according to an implementation environment, and embodiments of the present application do not limit the same. For example, the IOI threshold is 50%.

[0172] In a possible implementation, based on the fourth IOI being not greater than the IOI threshold, it is determined that the content of the video does not include the recording behavior. Based on the target occurrence frequency being greater than the frequency threshold, and at least one of the target modality and the target site not being included in the third video picture, seventh position information of a detection box containing the target modality in a candidate video picture and eighth position information of a detection box containing the target site in the candidate video picture are obtained. A fifth IOI of the target modality and the target site in the candidate video picture is determined according to the seventh position information and the eighth position information. Based on the fifth IOI being greater than the IOI threshold, it is determined that the content of the video includes the recording behavior. Based on the fifth IOI being not greater than the IOI threshold, it is determined that the content of the video does not include the recording behavior. The candidate video picture is a video picture closest to the third video picture and including the target modality and the target site in the plurality of video pictures for which detection is performed between the third video picture.

[0173] The process of determining the fifth IOI of the target modality and the target site in the candidate video picture according to the seventh position information and the eighth position information is similar to the process of determining the first IOI, and thus is not described herein again.

[0174] In a possible implementation, based on the content of the video including the recording behavior, and the target modality and the target site being included in the third video picture, a target mark is added at a position indicated by the fifth position information of the third video picture. The target mark is used to indicate that the target modality exists at the position indicated by the fifth position information. The target mark can be any kind of mark, and embodiments of the present application do not limit the same. For example, the target mark is a red dot.

[0175] Alternatively, based on the fact that the video content includes a recording behavior and at least one of the recording device in the target form and the target part is not included in the third video frame, a reference mark is added at the position indicated by the seventh position information of the candidate video frame, and the reference mark is used to indicate that the recording device in the target form exists at the position indicated by the seventh position information. The reference mark can be any kind of mark, and the embodiments of the present application do not limit it. For example, the reference mark is a green dot.

[0176] Alternatively, based on the fact that the electronic device is a terminal device, after the terminal device adds the target mark at the position indicated by the fifth position information of the third video frame, the terminal device can further display the third video frame with the added target mark, so that the user knows that the recording device in the target form exists at the position of the target mark. Alternatively, based on the fact that the electronic device is a server, the server and the terminal device are connected in communication through a wired network or a wireless network, after the server adds the target mark at the position indicated by the fifth position information of the third video frame, the server sends the third video frame with the added target mark to the terminal device, the terminal device receives the third video frame with the added target mark sent by the server, and displays the third video frame with the added target mark, so that the user knows that the recording device in the target form exists at the position of the target mark.

[0177] Alternatively, based on the fact that the electronic device is a terminal device, after the terminal device adds the reference mark at the position indicated by the seventh position information of the candidate video frame, the terminal device can further display the candidate video frame with the added reference mark, so that the user knows that the recording device in the target form exists at the position of the reference mark. Alternatively, based on the fact that the electronic device is a server, the server and the terminal device are connected in communication through a wired network or a wireless network, after the server adds the reference mark at the position indicated by the seventh position information of the candidate video frame, the server sends the candidate video frame with the added reference mark to the terminal device, the terminal device receives the candidate video frame with the added reference mark sent by the server, and displays the candidate video frame with the added reference mark, so that the user knows that the recording device in the target form exists at the position of the reference mark.

[0178] The method determines an initial video picture in the continuous multiple video pictures included in the video, and when the target intersection ratio between the detection frame of the recording device including the target form and the detection frame including the target part included in the initial video picture is greater than a reference threshold, tracks the multiple video pictures included in the video to obtain the target occurrence number of the recording device in the video, and determines whether the content of the video includes the recording behavior according to the target occurrence number. The method does not require manual participation, saves the time required for recording detection, improves the efficiency of recording detection, and improves the accuracy of recording detection because the recording behavior in the content of the video is determined by tracking the entire video instead of determining whether the recording behavior in the content of the video is based on a frame of video in the video.

[0179] Figure 5 is a flowchart of a recording detection method provided by an embodiment of the present application. The method includes the following steps.

[0180] Step 501: Obtain the continuous multiple video pictures included in the video to be recorded.

[0181] In a possible implementation, the process of obtaining the continuous multiple video pictures included in the video to be recorded has been described in step 201, and will not be repeated here.

[0182] Step 502: Call the target detection network to process each frame of video picture to obtain the video content included in each frame of video picture.

[0183] In a possible implementation, the process of obtaining the video content included in each frame of video picture has been described in step 202, and will not be repeated here.

[0184] Step 503: Determine the video picture in which the video content includes the recording device and the target part in the multiple video pictures.

[0185] In a possible implementation, the process of determining the video picture in which the video content includes the recording device and the target part in the multiple video pictures has been described in step 202, and will not be repeated here.

[0186] Step 504: Call the target classification network to classify the recording device included in the video picture including the recording device and the target part to obtain the form of the recording device included in the video picture including the recording device and the target part.

[0187] In a possible implementation, the process of determining the form of the recording device included in the video picture including the recording device and the target part has been described in step 202, and will not be repeated here.

[0188] Step 505, determining the initial video frame according to the shape of the recording device included in the video frame including the recording device and the target part.

[0189] In a possible implementation, the process of determining the initial video frame has been described in the above step 202, and will not be repeated here.

[0190] Step 506, determining the target intersection-over-union between the detection frame of the recording device of the target shape and the detection frame of the target part in the initial video frame.

[0191] In a possible implementation, the process of determining the target intersection-over-union between the detection frame of the recording device of the target shape and the detection frame of the target part in the initial video frame has been described in the above step 203, and will not be repeated here.

[0192] Step 507, based on the target intersection-over-union being greater than a reference threshold, obtaining an initial matrix according to the t-frame video frames.

[0193] In a possible implementation, t is greater than zero and less than the total number of video frames included in the video. The t-frame video frames are continuous t-frame video frames starting from the initial video frame. The process of obtaining the initial matrix has been described in the above step 204, and will not be repeated here.

[0194] Step 508, obtaining a sub-matrix of the (t+1)th video frame.

[0195] In a possible implementation, the process of obtaining the sub-matrix of the (t+1)th video frame has been described in the above step 204, and will not be repeated here.

[0196] Step 509, obtaining the first occurrence number of the recording device of the target shape between the initial video frame and the (t+1)th video frame according to the sub-matrix of the (t+1)th video frame and the initial matrix.

[0197] In a possible implementation, the process of obtaining the first occurrence number of the recording device between the initial video frame and the (t+1)th video frame has been described in the above step 204, and will not be repeated here.

[0198] Step 510, updating the first occurrence number to obtain the target occurrence number of the recording device of the target shape in the video.

[0199] In a possible implementation, the process of determining the target occurrence number of the recording device of the target shape in the video is similar to the process of the above step 205, and will not be repeated here.

[0200] In step 511, whether the content of the video includes the recording device is determined according to the target occurrence number.

[0201] In a possible implementation, the process of determining whether the content of the video includes the recording device according to the target occurrence number has been described in step 205, and will not be repeated here.

[0202] Figure 6 Fig. 1 shows a structural schematic diagram of a recording detection device provided by an embodiment of the present application. As shown in Fig. 1, the device includes: Figure 6

[0203] The acquisition module 601 is configured to acquire a plurality of continuous video frames included in a video to be subjected to recording detection.

[0204] The determination module 602 is configured to determine an initial video frame in the plurality of video frames, the initial video frame being a video frame in which a recording device in a target form and a target part first appear.

[0205] The determination module 602 is further configured to determine a target IoU between a detection box of the recording device in the target form and a detection box of the target part in the initial video frame.

[0206] The processing module 603 is configured to, based on the target IoU being greater than a reference threshold, process video frames other than the initial video frame in the plurality of video frames to obtain a target occurrence number of the recording device in the target form in the video.

[0207] The determination module 602 is further configured to determine whether the content of the video includes a recording behavior according to the target occurrence number.

[0208] In a possible implementation, the processing module 603 is configured to acquire an initial matrix according to a target number of video frames in the plurality of video frames, the initial matrix including a sub-matrix of the target number of video frames, the sub-matrix of any video frame being used to indicate position information of a detection box of the recording device in the target form in the any video frame, the target number of video frames being continuous target number of video frames starting from the initial video frame; acquire first position information of the detection box of the recording device in the target form in a first video frame, the first video frame being a video frame that appears continuously after the target number of video frames in the plurality of video frames; acquire position information of the detection box of the recording device in the target form in video frames corresponding to a plurality of sub-matrices included in the initial matrix according to the plurality of sub-matrices, to obtain a plurality of second position information; acquire a first occurrence number of the recording device in the target form between the initial video frame and the first video frame according to the first position information and the plurality of second position information; and determine the target occurrence number of the recording device in the target form in the video according to the initial matrix and the first occurrence number.​

[0209] In a possible implementation, the processing module 603 is configured to determine a first intersection-over-union between the detection frame determined according to the first position information and the detection frame determined according to each of the plurality of second position information, to obtain a target number of first intersection-overs-union; determine a first number of first intersection-overs-union that are greater than the target threshold value in the target number of first intersection-overs-union; based on the first number being greater than a number threshold value, set a first numerical value as the first occurrence number of the camera device with the target appearance between the initial video frame and the first video frame; based on the first number not being greater than the number threshold value, set a second numerical value as the first occurrence number of the camera device with the target appearance between the initial video frame and the first video frame, the second numerical value being less than the first numerical value.

[0210] In a possible implementation, the processing module 603 is configured to update the initial matrix according to the sub-matrix of the first video frame, to obtain a target matrix, the target matrix including the sub-matrix of the first video frame; obtain third position information of the detection frame containing the camera device with the target appearance in a second video frame, the second video frame being a video frame adjacent to the first video frame and after the first video frame; according to the plurality of sub-matrices included in the target matrix, obtain position information of the detection frame containing the camera device with the target appearance in a video frame corresponding to each of the sub-matrices, to obtain a plurality of fourth position information; update the first occurrence number according to the third position information and the plurality of fourth position information, to obtain a second occurrence number of the camera device with the target appearance between the initial video frame and the second video frame; and traverse video frames other than the target number of video frames, the first video frame and the second video frame in the video according to the above updating process, to obtain a target occurrence number of the camera device with the target appearance in the video.

[0211] In a possible implementation, the processing module 603 is configured to delete the sub-matrix of the initial video frame in the initial matrix, to obtain a reference matrix; and obtain the target matrix according to the reference matrix and the sub-matrix of the first video frame.

[0212] In a possible implementation, the processing module 603 is configured to determine a second intersection-over-union between the detection frame determined according to the third position information and the detection frame determined according to each of the plurality of fourth position information, to obtain a target number of second intersection-overs-union; determine a second number of second intersection-overs-union that are greater than the target threshold value in the target number of second intersection-overs-union; and update the first occurrence number according to the second number, to obtain a second occurrence number of the camera device with the target appearance between the initial video frame and the second video frame.

[0213] In a possible implementation, the processing module 603 is configured to update the first occurrence number according to the second number to obtain a reference number; obtain reference position information of a detection box of the camera with the target morphology in a reference video frame, the reference video frame being a video frame that is before the second video frame and is spaced apart from the second video frame by a target number of video frames; determine a third IoU between the detection box determined by the reference position information and the detection box determined by the third position information; and adjust the reference number according to the third IoU to obtain a second occurrence number of the camera with the target morphology between the initial video frame and the second video frame.

[0214] In a possible implementation, the processing module 603 is configured to, based on the second number being greater than a number threshold, add a third value to the first occurrence number to obtain the reference number; and based on the second number being not greater than the number threshold, add a fourth value to the first occurrence number to obtain the reference number, the fourth value being less than the third value.

[0215] In a possible implementation, the processing module 603 is configured to, based on the third IoU being greater than a target threshold, take the reference number as the second occurrence number of the camera with the target morphology between the initial video frame and the second video frame; and based on the third IoU being not greater than the target threshold, add a fifth value to the reference number to obtain the second occurrence number of the camera with the target morphology between the initial video frame and the second video frame.

[0216] In a possible implementation, the determining module 602 is configured to, based on the target occurrence number being greater than a number threshold and the third video frame including the camera with the target morphology and the target part, obtain fifth position information of a detection box of the camera with the target morphology and sixth position information of a detection box of the target part in the third video frame, the third video frame being a last video frame in the plurality of video frames; determine a fourth IoU of the camera with the target morphology and the target part in the third video frame according to the fifth position information and the sixth position information; and based on the fourth IoU being greater than an IoU threshold, determine that the content of the video includes the recording behavior.

[0217] In a possible implementation, the apparatus further includes:

[0218] The adding module is configured to add a target mark at a position indicated by the fifth position information of the third video frame, the target mark being used to indicate that the camera with the target morphology exists at the position indicated by the fifth position information.

[0219] The device determines an initial video frame in a plurality of video frames included in a video, and performs tracking on the plurality of video frames included in the video when a target intersection ratio between a detection frame of the recording device including a target shape and a detection frame including a target part included in the initial video frame is greater than a reference threshold value, to obtain a target occurrence number of the recording device in the video, and determines whether the content of the video includes a recording behavior according to the target occurrence number. This method does not require manual intervention, saves the time required for recording detection, improves the efficiency of recording detection, and improves the accuracy of recording detection because the entire video is tracked to determine whether the content of the video includes a recording behavior, rather than determining whether the content of the video includes a recording behavior based on a frame of video in the video.

[0220] It should be understood that the device provided above is only exemplified by the division of the above functional modules when realizing its functions, and in actual application, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the above described functions. In addition, the device and method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process is described in the method embodiments, which will not be described here.

[0221] Figure 7 The server 700 provided in the embodiments of the present application can have a large difference due to different configurations or performances, and can include one or more processors (Central Processing Units, CPUs) 701 and one or more memories 702, wherein the one or more memories 702 store at least one program code, the at least one program code is loaded and executed by the one or more processors 701 to implement the recording detection method provided in each method embodiment. Of course, the server 700 can also have a wired or wireless network interface, a keyboard, and an input and output interface, and other components for realizing the functions of the device, and will not be described here.

[0222] Figure 8A structure block diagram of a terminal device 800 provided by an example embodiment of the present application is shown. The terminal device 800 can be a portable mobile terminal, such as a smartphone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III), an MP4 player (Moving Picture Experts Group Audio Layer IV), a notebook computer, or a desktop computer. The terminal device 800 can also be referred to as a user device, a portable terminal, a laptop terminal, a desktop terminal, or other names.

[0223] Generally, the terminal device 800 includes a processor 801 and a memory 802.

[0224] The processor 801 can include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 801 can be implemented in at least one of a hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), a PLA (Programmable Logic Array). The processor 801 can also include a main processor and a coprocessor, the main processor being a processor for processing data in an awake state, also referred to as a CPU (Central Processing Unit), and the coprocessor being a low-power processor for processing data in a standby state. In some embodiments, the processor 801 can be integrated with a GPU (Graphics Processing Unit) for rendering and drawing content required to be displayed by a display screen. In some embodiments, the processor 801 can further include an AI (Artificial Intelligence) processor for processing computing operations related to machine learning.

[0225] The memory 802 can include one or more computer-readable storage media, which can be non-transitory. The memory 802 can also include a high-speed random access memory, and a non-volatile memory such as one or more disk storage devices, flash storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 802 is used to store at least one instruction for being executed by the processor 801 to implement a video recording detection method provided by a method embodiment of the present application.

[0226] In some embodiments, the terminal device 800 can further optionally include a peripheral device interface 803 and at least one peripheral device. The processor 801, the memory 802 and the peripheral device interface 803 can be connected through a bus or a signal line. Each peripheral device can be connected to the peripheral device interface 803 through a bus, a signal line or a circuit board. Specifically, the peripheral devices include at least one of a radio frequency circuit 804, a display screen 805, a camera component 806, an audio circuit 807, a positioning component 808 and a power supply 809.

[0227] The peripheral device interface 803 can be used to connect at least one peripheral device related to I / O (Input / Output) to the processor 801 and the memory 802. In some embodiments, the processor 801, the memory 802 and the peripheral device interface 803 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 801, the memory 802 and the peripheral device interface 803 can be implemented on a separate chip or circuit board, and the present embodiments are not limited in this regard.

[0228] The radio frequency circuit 804 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 804 communicates with a communication network and other communication devices through electromagnetic signals. The radio frequency circuit 804 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals. Optionally, the radio frequency circuit 804 includes an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and the like. The radio frequency circuit 804 can communicate with other terminal devices through at least one wireless communication protocol. The wireless communication protocol includes but is not limited to the World Wide Web, a metropolitan area network, an intranet, various generations of mobile communication networks (2G, 3G, 4G and 5G), a wireless local area network and / or a WiFi (Wireless Fidelity) network. In some embodiments, the radio frequency circuit 804 can also include NFC (Near Field Communication) related circuitry, which is not limited in the present application.

[0229] The display screen 805 is configured to display a UI (User Interface). The UI can include graphics, text, icons, video, and any combination thereof. When the display screen 805 is a touch display screen, the display screen 805 is further configured to capture touch signals on or above the surface of the display screen 805. The touch signals can be input to the processor 801 as control signals for processing. In this case, the display screen 805 can also be configured to provide virtual buttons and / or virtual keyboard, also known as soft buttons and / or soft keyboard. In some embodiments, the display screen 805 can be one, disposed on the front panel of the terminal device 800; in other embodiments, the display screen 805 can be at least two, respectively disposed on different surfaces of the terminal device 800 or in a folding design; in other embodiments, the display screen 805 can be a flexible display screen, disposed on a curved surface or a folding surface of the terminal device 800. Even, the display screen 805 can also be disposed in an irregular shape, i.e., a special-shaped screen. The display screen 805 can be made of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), etc.

[0230] The camera assembly 806 is configured to capture images or videos. Optionally, the camera assembly 806 includes a front camera and a rear camera. Typically, the front camera is disposed on the front panel of the terminal device 800, and the rear camera is disposed on the back of the terminal device 800. In some embodiments, the rear camera is at least two, which are any one of a main camera, a depth-of-field camera, a wide-angle camera, and a telephoto camera, to realize the background blur function by fusing the main camera and the depth-of-field camera, the panoramic shooting and VR (Virtual Reality) shooting function by fusing the main camera and the wide-angle camera, or other fusion shooting functions. In some embodiments, the camera assembly 806 can further include a flash. The flash can be a single-color-temperature flash or a dual-color-temperature flash. The dual-color-temperature flash refers to the combination of a warm light flash and a cold light flash, which can be used for light compensation under different color temperatures.

[0231] The audio circuit 807 can include a microphone and a speaker. The microphone is used to collect sound waves of a user and an environment, and convert the sound waves into an electrical signal input to the processor 801 for processing, or input to the radio frequency circuit 804 to realize voice communication. For the purpose of stereo sound collection or noise reduction, the microphone can be multiple, and arranged at different parts of the terminal device 800. The microphone can also be an array microphone or an omnidirectional collection type microphone. The speaker is used to convert an electrical signal from the processor 801 or the radio frequency circuit 804 into sound waves. The speaker can be a traditional diaphragm speaker, or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, not only can it convert an electrical signal into a sound wave audible to humans, but also can convert an electrical signal into an inaudible sound wave to humans for ranging purposes, etc. In some embodiments, the audio circuit 807 can also include a headphone jack.

[0232] The positioning component 808 is used to position the current geographic location of the terminal device 800 to realize navigation or LBS (Location Based Service). The positioning component 808 can be a positioning component based on the GPS (Global Positioning System) of the United States, the Beidou system of China, the Glonass system of Russia, or the Galileo system of the European Union.

[0233] The power supply 809 is used to supply power to each component in the terminal device 800. The power supply 809 can be alternating current, direct current, disposable battery or rechargeable battery. When the power supply 809 includes a rechargeable battery, the rechargeable battery can be a wired charging battery or a wireless charging battery. The wired charging battery is a battery charged through a wired line, and the wireless charging battery is a battery charged through a wireless coil. The rechargeable battery can also be used to support fast charging technology.

[0234] In some embodiments, the terminal device 800 further includes one or more sensors 810. The one or more sensors 810 include, but are not limited to, an acceleration sensor 811, a gyroscope sensor 812, a pressure sensor 813, a fingerprint sensor 814, an optical sensor 815, and a proximity sensor 816.

[0235] The acceleration sensor 811 can detect the acceleration magnitude in three coordinate axes of the coordinate system established by the terminal device 800. For example, the acceleration sensor 811 can be used to detect the components of the gravitational acceleration in three coordinate axes. The processor 801 can control the display screen 805 to display the user interface in a landscape view or a portrait view according to the gravitational acceleration signal collected by the acceleration sensor 811. The acceleration sensor 811 can also be used for game or user motion data collection.

[0236] The gyroscope sensor 812 can detect the body direction and rotation angle of the terminal device 800, and the gyroscope sensor 812 can cooperate with the acceleration sensor 811 to collect the 3D action of the user on the terminal device 800. According to the data collected by the gyroscope sensor 812, the processor 801 can realize the following functions: motion sensing (such as changing the UI according to the user's tilt operation), image stabilization when shooting, game control, and inertial navigation.

[0237] The pressure sensor 813 can be arranged on the side frame of the terminal device 800 and / or the lower layer of the display screen 805. When the pressure sensor 813 is arranged on the side frame of the terminal device 800, the user's holding signal on the terminal device 800 can be detected, and the left and right hand recognition or shortcut operation can be performed by the processor 801 according to the holding signal collected by the pressure sensor 813. When the pressure sensor 813 is arranged on the lower layer of the display screen 805, the controllable control on the UI interface can be controlled by the processor 801 according to the pressure operation of the user on the display screen 805. The controllable control includes at least one of a button control, a scroll bar control, an icon control, and a menu control.

[0238] The fingerprint sensor 814 is used to collect the fingerprint of the user, and the identity of the user can be recognized by the processor 801 according to the fingerprint collected by the fingerprint sensor 814, or by the fingerprint sensor 814 according to the collected fingerprint. When the identity of the user is recognized as a trusted identity, the processor 801 authorizes the user to perform related sensitive operations, including unlocking the screen, viewing encrypted information, downloading software, payment, and changing settings. The fingerprint sensor 814 can be arranged on the front, back or side of the terminal device 800. When the terminal device 800 is provided with a physical button or a manufacturer's logo, the fingerprint sensor 814 can be integrated with the physical button or the manufacturer's logo.

[0239] The optical sensor 815 is used to collect the ambient light intensity. In one embodiment, the processor 801 can control the display brightness of the display screen 805 according to the ambient light intensity collected by the optical sensor 815. Specifically, when the ambient light intensity is high, the display brightness of the display screen 805 is increased; when the ambient light intensity is low, the display brightness of the display screen 805 is decreased. In another embodiment, the processor 801 can also dynamically adjust the shooting parameters of the camera assembly 806 according to the ambient light intensity collected by the optical sensor 815.

[0240] The proximity sensor 816, also referred to as a distance sensor, is usually arranged on the front panel of the terminal device 800. The proximity sensor 816 is configured to collect the distance between the user and the front face of the terminal device 800. In an embodiment, when the proximity sensor 816 detects that the distance between the user and the front face of the terminal device 800 gradually decreases, the display screen 805 is switched from the bright screen state to the screen-off state under the control of the processor 801; when the proximity sensor 816 detects that the distance between the user and the front face of the terminal device 800 gradually increases, the display screen 805 is switched from the screen-off state to the bright screen state under the control of the processor 801.

[0241] Those skilled in the art can understand that the structure shown in the foregoing embodiments does not constitute a limitation on the terminal device 800, and the terminal device 800 can include more or fewer components than those shown in the drawings, or combine certain components, or adopt a different component arrangement. Figure 8

[0242] In an exemplary embodiment, a computer readable storage medium is also provided, and the storage medium stores at least one program code. The at least one program code is loaded and executed by the processor to enable the computer to implement any of the above-mentioned camera recording detection methods.

[0243] Optionally, the computer readable storage medium can be a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, etc.

[0244] In an exemplary embodiment, a computer program or computer program product is also provided, and the computer program or computer program product stores at least one computer instruction. The at least one computer instruction is loaded and executed by the processor to enable the computer to implement any of the above-mentioned camera recording detection methods.

[0245] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data for analysis, stored data, displayed data, etc.) and signals involved in the present application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards of relevant countries and regions. For example, the videos involved in the present application are obtained under full authorization.

[0246] ​It should be understood that the "multiple" mentioned herein refers to two or more than two. The "and / or" describes the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B can represent: A exists alone, A and B exist together, and B exists alone. The character " / " generally represents that the associated objects before and after it are in an "or" relationship.

[0247] The above-mentioned sequence numbers of the embodiments of the present application are only for description, and do not represent the advantages and disadvantages of the embodiments.

[0248] The above-mentioned only for the exemplary embodiments of the present application, and does not limit the present application, any modification, equivalent replacement, improvement, etc. made within the principles of the present application, should be included in the protection scope of the present application.

Claims

1. A method of recording detection, characterized by, The method comprises: obtaining continuous multiple frames of video pictures included in a video to be detected by recording; determining an initial video picture in the multiple frames of video pictures, the initial video picture being a video picture of a recording device in which a target part and a target form first appear; determining a target intersection-over-union between a detection box of the recording device containing the target form and a detection box containing the target part in the initial video picture; based on the target intersection-over-union being greater than a reference threshold, obtaining an initial matrix according to a target number of frames of video pictures in the multiple frames of video pictures, the initial matrix including sub-matrices of the target number of frames of video pictures, any video picture being used to indicate position information of the detection box of the recording device containing the target form in the any video picture, the target number of frames of video pictures being continuous target number of frames of video pictures starting from the initial video picture; obtaining first position information of the detection box of the recording device containing the target form in a first video picture, the first video picture being a video picture appearing continuously after the target number of frames of video pictures in the multiple frames of video pictures; obtaining position information of the detection box of the recording device containing the target form in video pictures corresponding to multiple sub-matrices included in the initial matrix according to the multiple sub-matrices, to obtain multiple second position information; obtaining a first occurrence number of the recording device of the target form between the initial video picture and the first video picture according to the first position information and the multiple second position information; determining a target occurrence number of the recording device of the target form in the video according to the initial matrix and the first occurrence number; determining whether the content of the video includes a recording behavior according to the target occurrence number.

2. The method of claim 1, wherein, The method comprises: determining a first intersection-over-union between the detection box determined by the first position information and detection boxes determined by the multiple second position information, to obtain a target number of first intersection-over-union; determining a first number of first intersection-over-union greater than a target threshold in the target number of first intersection-over-union; based on the first number being greater than a number threshold, taking a first value as the first occurrence number of the recording device of the target form between the initial video picture and the first video picture; based on the first number not being greater than the number threshold, taking a second value as the first occurrence number of the recording device of the target form between the initial video picture and the first video picture, the second value being less than the first value.

3. The method according to claim 1 or 2, characterized in that, The method comprises: updating the initial matrix according to a sub-matrix of the first video picture to obtain a target matrix, the target matrix including the sub-matrix of the first video picture; obtain third position information of a detection frame of the camera and recorder device containing the target appearance in a second video frame, the second video frame being a video frame adjacent to the first video frame and after the first video frame; obtain position information of a detection frame of the camera and recorder device containing the target appearance in a video frame corresponding to each sub-matrix according to a plurality of sub-matrices included in the target matrix, to obtain a plurality of fourth position information; update the first occurrence number according to the third position information and the plurality of fourth position information, to obtain a second occurrence number of the camera and recorder device containing the target appearance between the initial video frame and the second video frame; perform the updating process on video frames other than the target number of video frames, the first video frame and the second video frame in the video, to obtain a target occurrence number of the camera and recorder device containing the target appearance in the video.

4. The method of claim 3, wherein, The updating of the initial matrix according to the sub-matrix of the first video frame to obtain a target matrix includes: deleting the sub-matrix of the initial video frame in the initial matrix to obtain a reference matrix; obtaining the target matrix according to the reference matrix and the sub-matrix of the first video frame.

5. The method of claim 3, wherein, The updating of the first occurrence number according to the third position information and the plurality of fourth position information to obtain a second occurrence number of the camera and recorder device containing the target appearance between the initial video frame and the second video frame includes: determining a second intersection-over-union ratio between the detection frame determined by the third position information and the detection frame determined by the plurality of fourth position information, to obtain a target number of second intersection-over-union ratios; determining a second number of second intersection-over-union ratios greater than a target threshold value in the target number of second intersection-over-union ratios; updating the first occurrence number according to the second number to obtain a second occurrence number of the camera and recorder device containing the target appearance between the initial video frame and the second video frame.

6. The method of claim 5, wherein, The updating of the first occurrence number according to the second number to obtain a second occurrence number of the camera and recorder device containing the target appearance between the initial video frame and the second video frame includes: updating the first occurrence number according to the second number to obtain a reference number; obtaining reference position information of a detection frame of the camera and recorder device containing the target appearance in a reference video frame, the reference video frame being a video frame before the second video frame and spaced from the second video frame by a target number of video frames; determining a third intersection-over-union ratio between the detection frame determined by the reference position information and the detection frame determined by the third position information; adjusting the reference number according to the third intersection-over-union ratio to obtain a second occurrence number of the camera and recorder device containing the target appearance between the initial video frame and the second video frame.

7. The method of claim 6, wherein, The updating of the first occurrence number according to the second number to obtain a reference number includes: adding a third value to the first occurrence number on the basis of the second number being greater than a number threshold value to obtain a reference number; add a fourth value to the first occurrence number to obtain a reference number, the fourth value being less than the third value, based on the second number being not greater than the number threshold.

8. The method of claim 6, wherein, The adjusting the reference number according to the third Jaccard index to obtain a second occurrence number of the target-form recording device between the initial video frame and the second video frame includes: based on the third Jaccard index being greater than a target threshold, taking the reference number as the second occurrence number of the target-form recording device between the initial video frame and the second video frame; based on the third Jaccard index being not greater than the target threshold, adding a fifth value to the reference number to obtain the second occurrence number of the target-form recording device between the initial video frame and the second video frame.

9. The method according to any one of claims 1 to 2, 4 to 8, characterized in that, The determining whether the content of the video includes recording behavior according to the target occurrence number includes: based on the target occurrence number being greater than a number threshold and the third video frame including the target-form recording device and the target part, obtaining fifth position information of a detection box containing the target-form recording device and sixth position information of a detection box containing the target part in the third video frame, the third video frame being a last video frame for detection in the multiple video frames; determining a fourth Jaccard index of the target-form recording device and the target part in the third video frame according to the fifth position information and the sixth position information; based on the fourth Jaccard index being greater than a Jaccard index threshold, determining that the content of the video includes recording behavior.

10. The method of claim 9, wherein, After the determining that the content of the video includes recording behavior based on the fourth Jaccard index being greater than the Jaccard index threshold, the method further includes: adding a target mark at the position indicated by the fifth position information of the third video frame, the target mark being used to indicate that the target-form recording device exists at the position indicated by the fifth position information.

11. A recording detecting apparatus characterized by comprising: The apparatus includes: an acquisition module configured to acquire multiple continuous video frames included in a video to be detected for recording; a determination module configured to determine an initial video frame in the multiple video frames, the initial video frame being a video frame in which a target part and a target-form recording device first appear; the determination module is further configured to determine a target Jaccard index between a detection box containing the target-form recording device and a detection box containing the target part in the initial video frame; The processing module is configured to, based on the target intersection over union being greater than a reference threshold, acquire an initial matrix according to a target number of frames of video pictures in the plurality of frames of video pictures, the initial matrix including sub-matrices of the target number of frames of video pictures, any video picture being used to indicate position information of a bounding box of the recording device including the target appearance in the any video picture, the target number of frames of video pictures being continuous frames of video pictures starting from the initial video picture; acquire first position information of the bounding box of the recording device including the target appearance in a first video picture, the first video picture being a video picture that appears continuously after the target number of frames of video pictures in the plurality of frames of video pictures; acquire position information of the bounding box of the recording device including the target appearance in video pictures corresponding to a plurality of sub-matrices included in the initial matrix according to the plurality of sub-matrices, to obtain a plurality of second position information; acquire a first occurrence number of the recording device including the target appearance between the initial video picture and the first video picture according to the first position information and the plurality of second position information; and determine a target occurrence number of the recording device including the target appearance in the video according to the initial matrix and the first occurrence number. The determining module is further configured to determine whether the content of the video includes a recording behavior according to the target occurrence number.

12. An electronic device, comprising: The electronic device includes a processor and a memory, and the memory stores at least one program code, the at least one program code is loaded and executed by the processor, so that the electronic device implements the recording detection method as claimed in any one of claims 1 to 10.

13. A computer-readable storage medium, characterized in that, The computer readable storage medium stores at least one program code, and the at least one program code is loaded and executed by the processor, so that the computer implements the recording detection method as claimed in any one of claims 1 to 10.

Citation Information

Patent Citations

  • Mobile phone secret photographing behavior monitoring method and system

    CN113408379A