Video-based conversation scene anomaly detection method, terminal device and storage medium
Through the student network model of knowledge distillation and feature pyramid modules, the problem of errors in the detection of key points of the upper body of the human body and high hardware resource usage in conversation videos is solved, and accurate detection and identification of abnormal behaviors in conversation scenes are achieved.
Patent Information
- Application Number
- CN202111533341.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-15
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2041-12-15
AI Technical Summary
In conversation videos, existing deep learning-based abnormal human behavior detection methods have problems such as large extraction errors of the lower body of the human body, high hardware resource usage, large drift of key points extracted by ordinary convolutional neural networks during low-definition human detection, and cannot Determine the identity of the speaker and the person being spoken to.
Using the student network model based on knowledge distillation, the key points of the upper body of the human body are extracted through the feature pyramid module, and combined with the teacher network model for training, to achieve accurate detection of key points of the human body in the conversation scene, and to determine the speaker and the person being talked to in the panoramic screen identity.
It improves the accuracy and efficiency of human body key point detection, reduces the model's occupation of hardware resources, and enables intelligent detection of abnormal behaviors such as people leaving their positions, watching, and physical contact in conversation scenes.
Smart Images

Figure CN114445851B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of conversation scene anomaly detection, and in particular to a video-based conversation scene anomaly detection method, terminal equipment and storage medium. Background Art
[0002] When talking with special personnel within enterprises and institutions, it is necessary to follow compliance procedures and on-site conversation regulations, such as a fixed number of people present, a fixed range of personnel activities, etc., and the conversation process needs to be recorded on video for review by internal auditors.
[0003] With the gradual increase in the number of cameras, the demand for key element analysis in videos is also increasing, among which abnormal human behavior in videos is a relatively key analysis element. For human anomaly detection in videos, the invention patent "A method for identifying abnormal human behavior based on a monitoring system" with publication number CN107273866A adopts the traditional background modeling method to extract the relative area of the human body and compare it with the standard behavior database to identify abnormal human behavior. With the development of deep learning, human behavior recognition methods based on deep convolutional networks have also emerged in large numbers, and the shortcomings of the traditional background modeling plus behavior comparison method are more obvious. The invention patent "Real-time abnormal human behavior recognition method based on multi-scale convolutional neural network" with publication number CN106407903A uses a three-dimensional convolutional network to extract multi-scale features of the image to extract features and classify; the invention patent "A method for identifying abnormal human behavior based on machine vision based on multi-feature fusion" with publication number CN110633624A first detects the key points of the human body in the image, and then identifies whether the human behavior is abnormal based on the key points. The performance of human anomaly detection in surveillance videos based on deep learning is getting higher and higher, and it can basically meet the actual needs.
[0004] Although the human abnormal behavior detection (recognition) method based on deep learning has overcome the drawbacks of traditional human behavior comparison and has achieved good results in behavior recognition performance, there are some problems in directly applying it to conversation videos: 1: The video shot at the conversation site can only capture the upper body of the human body. When extracting the key points of the human body, there will be a large error in the lower body of the human body, which reduces the accuracy of the model. 2: Some existing methods use three-dimensional convolutional neural networks and image pyramids to extract features, which will increase the occupation of hardware resources by the network model; and some key point extraction methods use ordinary convolutional neural networks to extract features. When the picture is clear and the proportion of the human body in the image is relatively large, the performance can meet the requirements, but the conversation video uses a USB panoramic camera, the human body is small and the clarity is not very high, and the ordinary convolutional neural network extracts the key points of the human body. The drift is relatively large. If you want to maintain good detection performance, the model weight of extracting the key points of the human body is large, which affects the model reasoning performance. 3: The particularity between the conversation personnel, the identity of the talker and the person being talked to needs to be determined in the panoramic picture, and the existing methods do not have this function. Summary of the invention
[0005] In order to solve the above problems, the present invention proposes a video-based conversation scene anomaly detection method, terminal equipment and storage medium.
[0006] The specific plan is as follows:
[0007] A method for detecting anomalies in a conversation scene based on a video comprises the following steps:
[0008] S1: extracting a speaker image, a spoken person image, and a panoramic image including the speaker and the spoken person from a current frame of a video of a conversation scene;
[0009] S2: Detect the number of people in the panoramic image and determine the relationship between the number of people in the panoramic image and the total number of people actually talking and being talked to. If the number is greater than the total number, send a reminder of abnormal onlookers and return to S1; if the number is less than the total number, enter S3; if the number is equal to the total number, enter S4;
[0010] S3: Detect the number of people in the image of the speaker and the image of the person being spoken to respectively. If the number of people in the image of the speaker is less than the actual number of people being spoken to, send a reminder that the speaker has left the position, and return to S1; if the number of people in the image of the person being spoken to is less than the actual number of people being spoken to, send a reminder that the person being spoken to has left the position, and return to S1;
[0011] S4: labeling the speaker and the person being spoken to in the panoramic image by extracting human features from the speaker image and the person being spoken to image;
[0012] S5: marking key points of the upper body of the speaker and the person being spoken to in the panoramic image;
[0013] S6: Connect all the key points of the human body marked by each person, and determine whether the lines corresponding to the speaker and the person being spoken to intersect. If so, send a reminder that the people have physical contact and return to S1; otherwise, directly return to S1.
[0014] Furthermore, the process of marking the key points of the human bodies of the speaker and the person being spoken to in the panoramic image in step S5 includes the following steps:
[0015] S51: Collect a set of images with human body key points annotated to form a training set;
[0016] S52: Build a human body key point extraction model based on the RSN network, train the human body key point extraction model through the training set, and use the trained model as the teacher network model;
[0017] S53: Construct a student network model for extracting key points of the upper body. Based on knowledge distillation and the teacher network model, the student network model is trained using the training set.
[0018] The network structure of the student network model adopts a three-branch feature pyramid module. After the input image is input into the first branch, it passes through 6 convolutional layers and 2 deconvolution layers of the first branch with a step length of 2;
[0019] The second branch is derived from the output of the fourth convolutional layer of the first branch;
[0020] The second branch passes through a deconvolution layer and two convolution layers with a stride of 2 in sequence, and then performs the first feature fusion with the output of the sixth convolution layer in the first branch after passing through the deconvolution layer;
[0021] The third branch is derived from the output of the first convolutional layer of the second branch;
[0022] The third branch passes through a deconvolution layer and two convolution layers with a step size of 2 in sequence, and then performs the first upsampling operation. The result of the first upsampling operation and the output of the first feature fusion are subjected to the second feature fusion after passing through the deconvolution layer.
[0023] After the output of the second feature fusion is upsampled for the second time, it is fused for the third time with the output of the second deconvolution layer in the first branch;
[0024] The output of the three feature fusions is passed through two convolutional layers with a step size of 1 to obtain the key point atlas of the upper body corresponding to the input image;
[0025] S54: The trained student network model is used to mark the key points of the upper body of the speaker and the person being spoken to in the panoramic image.
[0026] Furthermore, the calculation formula of the loss function Loss in the student network model training process is:
[0027]
[0028] Among them, K represents the number of key points of the upper body. Represents the graph corresponding to the kth key point output by the teacher network, Represents the graph corresponding to the kth key point output by the student network.
[0029] Furthermore, the method for detecting the number of people in the image is performed using a human body detection algorithm.
[0030] A video-based conversation scene anomaly detection terminal device includes a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the method described above in the embodiment of the present invention are implemented.
[0031] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method described above in an embodiment of the present invention are implemented.
[0032] The present invention adopts the above technical solution to detect non-compliant behaviors such as people leaving their seats, people watching, and people contacting each other in conversation videos, thereby achieving the purpose of relatively intelligent violation detection in conversation videos. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 Shown is a flow chart of Embodiment 1 of the present invention.
[0034] Figure 2 Shown is a schematic diagram of the knowledge distillation frame process in this embodiment.
[0035] Figure 3 Shown is a schematic diagram of the structure of the student network in this embodiment. DETAILED DESCRIPTION
[0036] To further illustrate various embodiments, the present invention provides drawings. These drawings are part of the disclosure of the present invention, which are mainly used to illustrate the embodiments and can be used in conjunction with the relevant descriptions in the specification to explain the operating principles of the embodiments. With reference to these contents, ordinary technicians in this field should be able to understand other possible implementations and advantages of the present invention.
[0037] The present invention will now be further described with reference to the accompanying drawings and specific implementation methods.
[0038] Embodiment 1:
[0039] The embodiment of the present invention provides a method for detecting abnormalities in conversation scenes based on video. Figure 1 As shown, the method comprises the following steps:
[0040] S1: extracting a speaker image, a spoken person image, and a panoramic image including the speaker and the spoken person from a current frame of a video of a conversation scene.
[0041] In this embodiment, the image of the speaker, the image of the person being spoken to, and the panoramic image are captured respectively by three cameras installed in different positions, and the video of the conversation scene is a video synthesized by the images of the three cameras in a fixed size ratio, such as the foreground camera image of the speaker in the lower left corner (2 speakers), the rear camera image of the person being spoken to (1 speaker) in the lower right corner, and the panoramic camera image in the middle (3 people).
[0042] Since the abnormal points detected for conversation scene videos are mainly four abnormal points: the speaker is out of position, the person being interviewed is out of position, bystanders are watching, and the speaker and the person being interviewed have physical contact, among which, out of position means that the speaker or the person being interviewed does not appear in the speaker's screen image or the person being interviewed's screen image, bystanders are watching means that the number of people in the panoramic screen image exceeds the specified number, and physical contact means that the speaker and the person being interviewed have overlapping limbs. Based on this, the abnormal items are detected and deleted through subsequent steps.
[0043] S2: Detect the number of people in the panoramic image and determine its relationship with the total number of actual people talking and the total number of people being talked to. If it is greater, send a reminder of abnormal onlookers and return to S1; if it is less than, enter S3; if it is equal, enter S4.
[0044] The method for detecting the number of people in the image is performed using a commonly used human body detection algorithm, such as a face detection algorithm, which will not be described in detail here.
[0045] S3: Detect the number of people in the image of the speaker and the image of the person being spoken to respectively. If the number of people in the image of the speaker is less than the actual number of people being spoken to, send a reminder that the speaker has left and return to S1; if the number of people in the image of the person being spoken to is less than the actual number of people being spoken to, send a reminder that the person being spoken to has left and return to S1.
[0046] S4: labeling the speaker and the person being spoken to in the panoramic image by using the human features extracted from the speaker image and the person being spoken to image.
[0047] Since it is necessary to determine whether the speaker and the speaker have physical contact in the detection of physical contact, it is necessary to mark them in advance.
[0048] In the specific labeling process, the speaker's body features can be extracted from the speaker's screen image, and matched with all the body features extracted from the panoramic screen image. If the match is qualified, it is labeled as the speaker. The labeling method of the person being spoken to is similar to that of the speaker, which will not be repeated here.
[0049] S5: marking key points of the upper body of the speaker and the person being spoken to in the panoramic image.
[0050] Since most of the human bodies in conversation scenes are upper body, the existing human body key point extraction algorithms are mostly full body key point extraction, which has a low accuracy rate when applied to the conversation scenes of this embodiment. Therefore, this embodiment adopts the knowledge distillation method to construct a network model for extracting key points of the upper body for annotation. Figure 2 As shown, the specific annotation process includes the following steps:
[0051] S51: Collect a set of images with labeled key points of the human body to form a training set.
[0052] S52: Based on the RSN network, a human body key point (i.e., 17 key points) extraction model is constructed, and the human body key point extraction model is trained through the training set, and the trained model is used as the teacher network model.
[0053] S53: Construct a student network model for extracting key points (i.e., 11 key points) of the upper body of the human body, and train the student network model through the training set based on knowledge distillation and the teacher network model.
[0054] refer to Figure 3As shown, c represents the convolution operation, dc represents the deconvolution operation, and up represents the upsampling operation. The network structure of the student network model adopts a three-branch feature pyramid module. After the input image is input into the first branch, it passes through 6 convolutional layers with a step size of 2 and 2 deconvolutional layers of the first branch in sequence; the second branch is derived from the output of the 4th convolutional layer of the first branch; the second branch passes through a deconvolutional layer and two convolutional layers with a step size of 2 in sequence, and then performs the first feature fusion with the output of the 6th convolutional layer in the first branch after the deconvolution layer; the third branch is derived from the output of the 1st convolutional layer of the second branch; the third branch passes through a deconvolutional layer and two convolutional layers with a step size of 2 in sequence, and then performs the first upsampling operation, and the result of the first upsampling operation and the output of the first feature fusion after the deconvolution layer are subjected to the second feature fusion; the output of the second feature fusion is upsampled for the second time, and then the output of the second deconvolutional layer in the first branch is subjected to the third feature fusion; the output of the three feature fusions passes through 2 convolutional layers with a step size of 1 to obtain the key point atlas of the upper body of the human body corresponding to the input image.
[0055] The calculation formula of the loss function Loss during the student network model training process is:
[0056]
[0057] Wherein, K represents the number of key points of the upper body of the human body. In this embodiment, K=11. Represents the graph corresponding to the kth key point output by the teacher network, Represents the graph corresponding to the kth key point output by the student network.
[0058] S54: The trained student network model is used to mark the key points of the upper body of the speaker and the person being spoken to in the panoramic image.
[0059] S6: Connect all the key points of the human body marked by each person, and determine whether the lines corresponding to the speaker and the person being spoken to intersect. If so, send a reminder that the people have physical contact and return to S1; otherwise, directly return to S1.
[0060] The embodiment of the present invention takes into account the problem of human body occlusion in conversation scenes, uses a knowledge distillation algorithm to train a human key point detection algorithm, improves the performance of the human key point detection network, and accelerates the convergence speed. A feature pyramid network is used in the student network, which greatly improves the human key point detection performance with little speed impact.
[0061] Embodiment 2:
[0062] The present invention also provides a video-based conversation scene anomaly detection terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps in the above-mentioned method embodiment of embodiment 1 of the present invention when executing the computer program.
[0063] Further, as an executable solution, the video-based conversation scene anomaly detection terminal device can be a computing device such as a desktop computer, a notebook, a PDA, and a cloud server. The video-based conversation scene anomaly detection terminal device may include, but is not limited to, a processor and a memory. Those skilled in the art can understand that the composition structure of the above-mentioned video-based conversation scene anomaly detection terminal device is only an example of a video-based conversation scene anomaly detection terminal device, and does not constitute a limitation on the video-based conversation scene anomaly detection terminal device. It may include more or less components than the above-mentioned, or a combination of certain components, or different components. For example, the video-based conversation scene anomaly detection terminal device may also include input and output devices, network access devices, buses, etc., and the embodiments of the present invention do not limit this.
[0064] Further, as an executable solution, the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the video-based conversation scene anomaly detection terminal device, and uses various interfaces and lines to connect various parts of the entire video-based conversation scene anomaly detection terminal device.
[0065] The memory can be used to store the computer program and / or module, and the processor realizes various functions of the video-based conversation scene anomaly detection terminal device by running or executing the computer program and / or module stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system and at least one application required for a function; the data storage area can store data created according to the use of the mobile phone, etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0066] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above method in the embodiment of the present invention are implemented.
[0067] If the module / unit integrated in the video-based conversation scene anomaly detection terminal device is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device that can carry the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory) and software distribution medium, etc.
[0068] Although the present invention has been specifically shown and described in conjunction with the preferred embodiments, it should be understood by those skilled in the art that various changes may be made to the present invention in form and details without departing from the spirit and scope of the present invention as defined by the appended claims, all of which are within the scope of protection of the present invention.
Claims
1. A video-based conversation scene anomaly detection method, characterized in that: The following steps are involved: S1: extracting a speaker image, a spoken person image, and a panoramic image including the speaker and the spoken person from a current frame of a video of a conversation scene; S2: Detect the number of people in the panoramic image, and determine the relationship between the number of people in the panoramic image and the total number of people actually talking and being talked to. If the number is greater than the total number, send a reminder of abnormal onlookers, and return to S1; If less than, go to S3; if equal, go to S4; S3: Detect the number of people in the image of the speaker and the image of the person being spoken to respectively. If the number of people in the image of the speaker is less than the actual number of people being spoken to, send a reminder that the speaker has left the position, and return to S1; if the number of people in the image of the person being spoken to is less than the actual number of people being spoken to, send a reminder that the person being spoken to has left the position, and return to S1; S4: labeling the speaker and the person being spoken to in the panoramic image by extracting human features from the speaker image and the person being spoken to image; S5: marking key points of the upper body of the speaker and the person being spoken to in the panoramic image; the marking process includes the following steps: S51: Collect a set of images with human body key points annotated to form a training set; S52: Build a human body key point extraction model based on the RSN network, train the human body key point extraction model through the training set, and use the trained model as the teacher network model; S53: Construct a student network model for extracting key points of the upper body. Based on knowledge distillation and the teacher network model, the student network model is trained using the training set. The network structure of the student network model adopts a three-branch feature pyramid module. After the input image is input into the first branch, it passes through 6 convolutional layers with a stride of 2 and 2 deconvolution layers of the first branch in sequence; The second branch is derived from the output of the fourth convolutional layer of the first branch; The second branch passes through a deconvolution layer and two convolution layers with a stride of 2 in sequence, and then performs the first feature fusion with the output of the sixth convolution layer in the first branch after passing through the deconvolution layer; The third branch is derived from the output of the first convolutional layer of the second branch; The third branch passes through a deconvolution layer and two convolution layers with a step size of 2 in sequence, and then performs the first upsampling operation. The result of the first upsampling operation and the output of the first feature fusion are subjected to the second feature fusion after passing through the deconvolution layer. After the output of the second feature fusion is upsampled for the second time, it is fused for the third time with the output of the second deconvolution layer in the first branch; The output of the three feature fusions is passed through two convolutional layers with a step size of 1 to obtain the key point atlas of the upper body corresponding to the input image; S54: labeling key points of the upper body of the speaker and the person being spoken to in the panoramic image through the trained student network model; S6: Connect all the key points of the human body marked by each person, and determine whether the lines corresponding to the speaker and the person being spoken to intersect. If so, send a reminder that the people have physical contact and return to S1; otherwise, directly return to S1.
2. The method for detecting anomalies in conversation scenes based on video according to claim 1, characterized in that: The calculation formula of the loss function Loss during the student network model training process is: Among them, K represents the number of key points of the upper body. Represents the graph corresponding to the kth key point output by the teacher network, Represents the graph corresponding to the kth key point output by the student network.
3. The method for detecting anomalies in conversation scenes based on video according to claim 1, characterized in that: The method for detecting the number of people in the image is carried out using a human body detection algorithm.
4. A video-based conversation scene anomaly detection terminal device, characterized in that: The method comprises a processor, a memory and a computer program stored in the memory and running on the processor, wherein the processor implements the steps of the method according to any one of claims 1 to 3 when executing the computer program.
5. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 3 are implemented.
Citation Information
Patent Citations
Multiple dimensioned convolution neural network-based real time human body abnormal behavior identification method
CN106407903A
Human body abnormal behavior identification method based on monitoring system
CN107273866A
Machine vision human body abnormal behavior recognition method based on multi-feature fusion
CN110633624A
Human body key point detection method and device and electronic equipment
CN110619316A
Alarm method and device, electronic equipment and storage medium
CN110751007A
