CN113486853A - Video detection method and device, electronic equipment and medium - Google Patents

Video detection method and device, electronic equipment and medium Download PDF

Info

Publication number
CN113486853A
CN113486853A CN202110865078.XA CN202110865078A CN113486853A CN 113486853 A CN113486853 A CN 113486853A CN 202110865078 A CN202110865078 A CN 202110865078A CN 113486853 A CN113486853 A CN 113486853A
Authority
CN
China
Prior art keywords
video
detected
stretched
training
picture
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110865078.XA
Other languages
Chinese (zh)
Other versions
CN113486853B (en
Inventor
谢强
***
于天宝
贠挺
陈国庆
林赛群
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202110865078.XA priority Critical patent/CN113486853B/en
Publication of CN113486853A publication Critical patent/CN113486853A/en
Application granted granted Critical
Publication of CN113486853B publication Critical patent/CN113486853B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Image Analysis (AREA)

Abstract

The present disclosure provides a video detection method, an apparatus, an electronic device, a computer-readable storage medium, and a computer program product, and relates to the field of computers, in particular to the field of computer vision and deep learning technology. The implementation scheme is as follows: acquiring a plurality of video frames of a video to be detected; inputting a plurality of video frames into a video detection model to obtain identification results which are output by the video detection model and respectively correspond to each video frame; and determining whether the video to be detected is the stretched video or not according to a plurality of identification results respectively corresponding to the plurality of video frames. The video detection model is obtained by training a preset model based on training data including supervision data, wherein the supervision data includes label data of whether a sample video frame contains key video elements.

Description

Video detection method and device, electronic equipment and medium
Technical Field
The present disclosure relates to the field of computers, and in particular, to the field of computer vision and deep learning technologies, and in particular, to a video detection method and apparatus, an electronic device, a computer-readable storage medium, and a computer program product.
Background
Artificial intelligence is the subject of research that makes computers simulate some human mental processes and intelligent behaviors (such as learning, reasoning, thinking, planning, etc.), both at the hardware level and at the software level. The artificial intelligence hardware technology generally comprises technologies such as a sensor, a special artificial intelligence chip, cloud computing, distributed storage, big data processing and the like, and the artificial intelligence software technology mainly comprises a computer vision technology, a voice recognition technology, a natural language processing technology, machine learning/deep learning, a big data processing technology, a knowledge graph technology and the like.
Along with the improvement of living standard of people and the development of science and technology, the ways of people to acquire information and entertainments gradually change, and videos rapidly occupy the fragment time of people in life due to the characteristics of rich content, high information density, strong interestingness and the like. In search and recommendation related products, videos are a new content presentation mode preferred by users. In the video production process, due to the uneven levels of video creators, in the process of editing and transcoding the video, the setting of the height ratio parameters of partial video bandwidth is abnormal, so that the stretching distortion of the video image occurs. People and objects in the video with stretching distortion have abnormal aspect ratio, and the user experience of the product is influenced.
Disclosure of Invention
The present disclosure provides a video detection method, apparatus, electronic device, computer-readable storage medium, and computer program product.
According to an aspect of the present disclosure, there is provided a video detection method, including: acquiring a plurality of video frames of a video to be detected; inputting the plurality of video frames into a video detection model to obtain a recognition result which is output by the video detection model and corresponds to each video frame, wherein the video detection model is obtained by training a preset model based on training data including supervision data, and the supervision data includes label data indicating whether a sample video frame contains a key video element; and determining whether the video to be detected is a stretched video or not according to a plurality of identification results respectively corresponding to the plurality of video frames.
According to another aspect of the present disclosure, there is provided a model training method, including: acquiring a plurality of pictures and determining whether each picture in the plurality of pictures is a stretched picture to generate training data; determining whether each picture of the plurality of pictures contains a key picture element to generate supervisory data for the training data; and training a preset model based on the training data including the supervision data so that the model identifies whether the input picture is a stretched picture.
According to another aspect of the present disclosure, there is provided a video detection apparatus including: an acquisition unit configured to acquire a plurality of video frames of a video to be detected; the detection unit is configured to input the plurality of video frames into a video detection model, and obtain a recognition result which is output by the video detection model and corresponds to each video frame, wherein the video detection model is obtained by training a preset model based on training data including supervision data, and the supervision data includes label data indicating whether a sample video frame contains a key video element; and a determination unit configured to determine whether the video to be detected is a stretched video according to a plurality of the recognition results respectively corresponding to the plurality of video frames.
According to another aspect of the present disclosure, there is provided a model training apparatus including: an acquisition unit configured to acquire a plurality of pictures and determine whether each of the plurality of pictures is a stretched picture to generate training data; a determining unit configured to determine whether each of the plurality of pictures contains a key picture element to generate supervised data of the training data; and a training unit configured to train a preset model based on the training data including the supervision data so that the model recognizes whether the inputted picture is a stretched picture.
According to another aspect of the present disclosure, there is provided an electronic device including: at least one processor; and a memory communicatively coupled to the at least one processor; the memory stores instructions executable by the at least one processor to cause the at least one processor to perform the method of the present disclosure.
According to another aspect of the present disclosure, there is provided a non-transitory computer readable storage medium storing computer instructions for causing a computer to perform the method described in the present disclosure.
According to another aspect of the disclosure, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the method described in the disclosure.
According to one or more embodiments of the present disclosure, the trained model is applied to video stretching distortion detection, so that the efficiency of detecting stretching distortion of a video can be improved, and the operation cost of a product can be reduced.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate exemplary embodiments of the embodiments and, together with the description, serve to explain the exemplary implementations of the embodiments. The illustrated embodiments are for purposes of illustration only and do not limit the scope of the claims. Throughout the drawings, identical reference numbers designate similar, but not necessarily identical, elements.
FIG. 1 illustrates a schematic diagram of an exemplary system in which various methods described herein may be implemented, according to an embodiment of the present disclosure;
fig. 2 shows a flow diagram of a video detection method according to an embodiment of the present disclosure;
FIG. 3 shows a flow diagram of a model training method according to an embodiment of the present disclosure;
FIG. 4 shows a schematic structural diagram of a convolutional neural network for video stretch detection, in accordance with an embodiment of the present disclosure;
fig. 5 shows a flow chart for determining whether a video to be detected is a stretched video according to an embodiment of the present disclosure;
fig. 6 shows a block diagram of a video detection apparatus according to an embodiment of the present disclosure;
FIG. 7 shows a block diagram of a model training apparatus according to an embodiment of the present disclosure; and
FIG. 8 illustrates a block diagram of an exemplary electronic device that can be used to implement embodiments of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of the embodiments of the disclosure are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
In the present disclosure, unless otherwise specified, the use of the terms "first", "second", etc. to describe various elements is not intended to limit the positional relationship, the timing relationship, or the importance relationship of the elements, and such terms are used only to distinguish one element from another. In some examples, a first element and a second element may refer to the same instance of the element, and in some cases, based on the context, they may also refer to different instances.
The terminology used in the description of the various described examples in this disclosure is for the purpose of describing particular examples only and is not intended to be limiting. Unless the context clearly indicates otherwise, if the number of elements is not specifically limited, the elements may be one or more. Furthermore, the term "and/or" as used in this disclosure is intended to encompass any and all possible combinations of the listed items.
Embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.
Fig. 1 illustrates a schematic diagram of an exemplary system 100 in which various methods and apparatus described herein may be implemented in accordance with embodiments of the present disclosure. Referring to fig. 1, the system 100 includes one or more client devices 101, 102, 103, 104, 105, and 106, a server 120, and one or more communication networks 110 coupling the one or more client devices to the server 120. Client devices 101, 102, 103, 104, 105, and 106 may be configured to execute one or more applications.
In embodiments of the present disclosure, the server 120 may run one or more services or software applications that enable the video detection method and/or the model training method to be performed.
In some embodiments, the server 120 may also provide other services or software applications that may include non-virtual environments and virtual environments. In certain embodiments, these services may be provided as web-based services or cloud services, for example, provided to users of client devices 101, 102, 103, 104, 105, and/or 106 under a software as a service (SaaS) model.
In the configuration shown in fig. 1, server 120 may include one or more components that implement the functions performed by server 120. These components may include software components, hardware components, or a combination thereof, which may be executed by one or more processors. A user operating a client device 101, 102, 103, 104, 105, and/or 106 may, in turn, utilize one or more client applications to interact with the server 120 to take advantage of the services provided by these components. It should be understood that a variety of different system configurations are possible, which may differ from system 100. Accordingly, fig. 1 is one example of a system for implementing the various methods described herein and is not intended to be limiting.
A user may use client devices 101, 102, 103, 104, 105, and/or 106 to upload videos to be detected or obtain video detection results, and so on. The client device may provide an interface that enables a user of the client device to interact with the client device. The client device may also output information to the user via the interface. Although fig. 1 depicts only six client devices, those skilled in the art will appreciate that any number of client devices may be supported by the present disclosure.
Client devices 101, 102, 103, 104, 105, and/or 106 may include various types of computer devices, such as portable handheld devices, general purpose computers (such as personal computers and laptop computers), workstation computers, wearable devices, gaming systems, thin clients, various messaging devices, sensors or other sensing devices, and so forth. These computer devices may run various types and versions of software applications and operating systems, such as MICROSOFT Windows, APPLE iOS, UNIX-like operating systems, Linux, or Linux-like operating systems (e.g., Google Chrome OS); or include various Mobile operating systems such as MICROSOFT Windows Mobile OS, iOS, Windows Phone, Android. Portable handheld devices may include cellular telephones, smart phones, tablets, Personal Digital Assistants (PDAs), and the like. Wearable devices may include head mounted displays and other devices. The gaming system may include a variety of handheld gaming devices, internet-enabled gaming devices, and the like. The client device is capable of executing a variety of different applications, such as various Internet-related applications, communication applications (e.g., email applications), Short Message Service (SMS) applications, and may use a variety of communication protocols.
Network 110 may be any type of network known to those skilled in the art that may support data communications using any of a variety of available protocols, including but not limited to TCP/IP, SNA, IPX, etc. By way of example only, one or more networks 110 may be a Local Area Network (LAN), an ethernet-based network, a token ring, a Wide Area Network (WAN), the internet, a virtual network, a Virtual Private Network (VPN), an intranet, an extranet, a Public Switched Telephone Network (PSTN), an infrared network, a wireless network (e.g., bluetooth, WIFI), and/or any combination of these and/or other networks.
The server 120 may include one or more general purpose computers, special purpose server computers (e.g., PC (personal computer) servers, UNIX servers, mid-end servers), blade servers, mainframe computers, server clusters, or any other suitable arrangement and/or combination. The server 120 may include one or more virtual machines running a virtual operating system, or other computing architecture involving virtualization (e.g., one or more flexible pools of logical storage that may be virtualized to maintain virtual storage for the server). In various embodiments, the server 120 may run one or more services or software applications that provide the functionality described below.
The computing units in server 120 may run one or more operating systems including any of the operating systems described above, as well as any commercially available server operating systems. The server 120 may also run any of a variety of additional server applications and/or middle tier applications, including HTTP servers, FTP servers, CGI servers, JAVA servers, database servers, and the like.
In some implementations, the server 120 may include one or more applications to analyze and consolidate data feeds and/or event updates received from users of the client devices 101, 102, 103, 104, 105, and 106. Server 120 may also include one or more applications to display data feeds and/or real-time events via one or more display devices of client devices 101, 102, 103, 104, 105, and 106.
In some embodiments, the server 120 may be a server of a distributed system, or a server incorporating a blockchain. The server 120 may also be a cloud server, or a smart cloud computing server or a smart cloud host with artificial intelligence technology. The cloud Server is a host product in a cloud computing service system, and is used for solving the defects of high management difficulty and weak service expansibility in the traditional physical host and Virtual Private Server (VPS) service.
The system 100 may also include one or more databases 130. In some embodiments, these databases may be used to store data and other information. For example, one or more of the databases 130 may be used to store data such as detection videos, recognition results, training data, and the like. The data store 130 may reside in various locations. For example, the data store used by the server 120 may be local to the server 120, or may be remote from the server 120 and may communicate with the server 120 via a network-based or dedicated connection. The data store 130 may be of different types. In certain embodiments, the data store used by the server 120 may be a database, such as a relational database. One or more of these databases may store, update, and retrieve data to and from the database in response to the command.
In some embodiments, one or more of the databases 130 may also be used by applications to store application data. The databases used by the application may be different types of databases, such as key-value stores, object stores, or regular stores supported by a file system.
The system 100 of fig. 1 may be configured and operated in various ways to enable application of the various methods and apparatus described in accordance with the present disclosure.
The video has stretching distortion, which brings great harm to the user experience of watching the video, even causes physiological discomfort, and can cause corresponding video products to lose praise and lose users in the past, thereby causing great influence on company income. The use of manual screening of rejects is inefficient, requires the employment of a large number of auditors and training of the business, and is costly. In addition, manual review is often used to result in missed reviews because of the inattention of the reviewers. Therefore, how to identify the video with stretching distortion in the massive video becomes a problem to be solved urgently by video products. Video stretching distortion is generally caused by abnormal setting of video aspect ratio in the process of video compression transcoding, and for a video with a correct aspect ratio lost, how to identify stretching distortion in a picture is a difficult problem.
Accordingly, a video detection method is provided according to an embodiment of the present disclosure. Fig. 2 shows a flow diagram 200 of a video detection method according to an embodiment of the present disclosure. As shown in fig. 2, the method 200 may include: acquiring a plurality of video frames of a video to be detected (step 210); inputting a plurality of video frames into a video detection model to obtain a recognition result which is output by the video detection model and corresponds to each video frame, wherein the video detection model is obtained by training a preset model based on training data comprising supervision data, and the supervision data comprises label data (220) of whether a sample video frame contains a key video element; and determining whether the video to be detected is a stretched video according to a plurality of identification results respectively corresponding to the plurality of video frames (step 230).
In recent years, a video image detection technology based on a neural network has become a hot trend in the field of computer vision in recent years, and the technology enables a computer to extract effective feature combinations from images in a mode similar to the operation of a human nervous system.
In some examples, the video detection model is a trained deep learning based convolutional neural network. It should be understood that other possible network models are possible and are not limiting herein.
Embodiments according to the present disclosure provide a model training method, which may be used for training the video detection model described above, for example. As shown in FIG. 3, the model training method 300 may include: acquiring a plurality of pictures and determining whether each picture in the plurality of pictures is a stretched picture to generate training data (step 310); determining whether each picture of a plurality of pictures contains a key picture element to generate supervised data for the training data (step 320); and training a preset model based on training data including supervision data so that the model recognizes whether the inputted picture is a stretched picture (step 330).
According to the embodiment of the disclosure, the model obtained by training can more accurately identify whether the picture is a stretched picture or not through the supervision data based on the key picture elements.
In an embodiment of training a video detection model by using the above model training method, a large number of pictures may be used for stretching and scaling to generate training data of the video detection model. For example, the multiple pictures may be subjected to stretching scaling to different degrees by a linear interpolation method, so as to obtain the labeled training data. The label is the degree of stretch of the picture, for example, transverse stretch or longitudinal stretch.
In some embodiments, the degree of stretching may be a numerical value. For example, the above-mentioned stretch case labels are floating point numbers: less than 1 is transverse stretching, with smaller representing greater degree of stretching; greater than 1 is machine direction stretch, with greater indicating greater stretch; equal to 1 indicates that the picture has not been stretched.
The training data of the video detection model includes, in addition to the above-described label representing the degree of stretch, a label of whether the sample picture contains a key picture element. According to some embodiments, the key picture elements (i.e., key video elements) may include human faces. The user is sensitive to the stretching distortion of the human face when watching the video and is not sensitive to the stretching distortion of the video without a reference object. Therefore, the label of the existence of the human face can be used as auxiliary supervision when model training is carried out.
In some examples, the weight of the model in learning the degree of stretch of the picture with or without the face may be adjusted so that the model can explicitly learn face-related features for stretch degree recognition. Experiments prove that the auxiliary supervision loss function is more accurate for the stretching identification of the contained human face.
For example, a face detection algorithm may be used to perform face detection on pictures in the training data. For a picture with a detected face, an auxiliary tag is set, for example, an auxiliary tag of 1 indicates that there is a face in the picture, and an auxiliary tag of 0 indicates that there is no face.
In some embodiments, the tagged pictures are input as training data into a deep convolutional neural network specifically designed for stretch distortion detection for training. The auxiliary label determines the coefficient of learning the stretching degree during training, which is equivalent to the attention mechanism of adding the face during training, wherein the loss function can be as follows:
Figure BDA0003187240630000081
wherein p isi、ti、liAnd q isiRespectively obtaining a predicted value of the picture stretching degree, a label value of the stretching degree, a predicted value of the face and a label value of the face; α, β and λ are constant coefficients, for example 0.1, 0.5 and 0.5, respectively. It is understood that other possible loss functions are also applicable, and are not limited herein. The corresponding stretching degree learning coefficients are different when the human face exists or not, so that the video detection model can learn the characteristics related to the human face in the training process, and is more sensitive to stretching in the presence of the human face. After multiple rounds of training, the model is converged, and a video detection model capable of predicting the stretching distortion degree of the video picture is obtained.
After the trained video detection model is obtained, the video to be detected can be detected based on the video detection model.
First, a plurality of video frames of a video to be detected are acquired. In some examples, a video to be detected may be decoded to obtain a plurality of video frames. For example, when detecting short videos in a short video platform, 20 frames may be extracted for each short video, with an extraction interval of T ═ T/20, and T being the short video duration.
According to some embodiments, the method according to the present disclosure may further comprise: and preprocessing the plurality of video frames to input the preprocessed plurality of video frames into the video detection model. This pre-treatment may for example comprise: normalization, equal aspect ratio scaling, boundary zero padding, etc. Since stretch distortion identifies the stretch distortion of the picture to be identified, the pre-processing uses equal aspect ratio scaling, which does not change the scale of the picture (video frame) to be detected. For example, zero padding may be performed on non-square pictures after scaling with equal aspect ratio to obtain pictures of corresponding sizes (e.g., 224 x 224).
In some examples, the preset model may include a convolutional neural network model. Fig. 4 shows a schematic structural diagram of a convolutional neural network for video stretch level detection according to an embodiment of the present disclosure. As shown in fig. 4, the input (input) picture is a picture of 224 × 3, and then passes through the plurality of convolution layers (Conv) and Pooling layers (Pooling) and is output through the full connection layer (FC). It will of course be appreciated that other forms of network architectures are possible and not limiting herein.
According to some embodiments, when the recognition result is a numerical value, as shown in fig. 5, determining whether the video to be detected is a stretched video (step 230) may include: acquiring a first number of recognition results with the highest numerical value and a second number of recognition results with the lowest numerical value in the plurality of recognition results (step 510); determining a first average value of the first number of recognition results and a second average value of the second number of recognition results, respectively (step 520); and judging whether the video to be detected is a stretched video or not based on the first average value and the second average value (step 530).
Considering that the existence of a key video element (such as a human face) in a video segment affects the judgment of the stretching degree, and the element in the video segment may not exist all the time, the stretching degree of the whole video can be judged more accurately according to the maximum average value and the minimum average value of the identification result.
It is understood that the key video element in accordance with the embodiments of the present disclosure is not just a human face, but other elements are possible, such as a building. In some examples, a video detection model may be trained assistively based on one or more key video elements.
According to some embodiments, determining whether the video to be detected is a stretched video based on the first average value and the second average value may include: determining that the video to be detected is one of longitudinal stretching and transverse stretching in response to the first average value being greater than a first threshold value and the second average value being greater than a second threshold value; and determining that the video to be detected is the other one of longitudinal stretching and transverse stretching in response to the first average value being smaller than the third threshold and the second average value being smaller than the fourth threshold.
In an embodiment according to the present disclosure, after the extracted picture is preprocessed (normalized, scaled with equal aspect ratio, and zero-filled at the boundary), the preprocessed picture is identified frame by using a trained video detection model to obtain a single-frame picture stretching degree score. The stretching numerical value output by the video detection model is a floating point number: less than 1 is transverse stretching, with smaller representing greater degree of stretching; greater than 1 is machine direction stretch, with greater indicating greater stretch; equal to 1 indicates that the picture has not been stretched. Sorting the stretching results of the 20 frames of pictures according to numerical values, and taking the average Score of the 8 frames of pictures with the largest numerical value as Scorelarge_averageTaking the average Score of the 8 frames with the minimum value as Scoresmall_average(ii) a If Scorelarge_averageGreater than 1.4 and Scoresmall_averageIf the video is larger than 1.2, the video is considered to be longitudinally stretched; if Scorelarge_averageLess than 0.9 and Scoresmall_averageLess than 0.85, the video is considered to be laterally stretched; otherwise, the video is considered to be normal video.
According to the detection method disclosed by the invention, the video with stretching distortion in the massive video can be effectively detected, the accuracy is higher, the robustness is good, and the manpower and material resources are saved.
According to an embodiment of the present disclosure, as shown in fig. 6, there is also provided a video detection apparatus 600 including: an acquisition unit 610 configured to acquire a plurality of video frames of a video to be detected; a detecting unit 620, configured to input the plurality of video frames into a video detection model, and obtain a recognition result output by the video detection model and corresponding to each of the video frames, where the video detection model is obtained by training a preset model based on training data including surveillance data, and the surveillance data includes tag data indicating whether a sample video frame includes a key video element; and a determining unit 630 configured to determine whether the video to be detected is a stretched video according to a plurality of the recognition results respectively corresponding to the plurality of video frames.
Here, the operations of the above units 610 to 630 of the video detection apparatus 600 are similar to the operations of the steps 210 to 230 described above, and are not repeated herein.
According to an embodiment of the present disclosure, as shown in fig. 7, there is also provided a model training apparatus 700, including: an obtaining unit 710 configured to obtain a plurality of pictures and determine whether each of the plurality of pictures is a stretched picture to generate training data; a determining unit 720 configured to determine whether each picture of the plurality of pictures contains a key picture element to generate supervised data of the training data; and a training unit 730 configured to train a preset model based on the training data including the supervision data so that the model recognizes whether the inputted picture is a stretched picture.
Here, the operations of the above units 710 to 730 of the model training apparatus 700 are similar to the operations of the steps 310 to 330 described above, and are not repeated herein.
In the technical scheme of the disclosure, the acquisition, storage, application and the like of the personal information of the related user all accord with the regulations of related laws and regulations, and do not violate the good customs of the public order.
According to an embodiment of the present disclosure, there is also provided an electronic device, a readable storage medium, and a computer program product.
Referring to fig. 8, a block diagram of a structure of an electronic device 800, which may be a server or a client of the present disclosure, which is an example of a hardware device that may be applied to aspects of the present disclosure, will now be described. Electronic device is intended to represent various forms of digital electronic computer devices, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 8, the apparatus 800 includes a computing unit 801 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM)802 or a computer program loaded from a storage unit 808 into a Random Access Memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the device 800 can also be stored. The calculation unit 801, the ROM 802, and the RAM 803 are connected to each other by a bus 804. An input/output (I/O) interface 805 is also connected to bus 804.
A number of components in the device 800 are connected to the I/O interface 805, including: an input unit 806, an output unit 807, a storage unit 808, and a communication unit 809. The input unit 806 may be any type of device capable of inputting information to the device 800, and the input unit 806 may receive input numeric or character information and generate key signal inputs related to user settings and/or function controls of the electronic device, and may include, but is not limited to, a mouse, a keyboard, a touch screen, a track pad, a track ball, a joystick, a microphone, and/or a remote control. Output unit 807 can be any type of device capable of presenting information and can include, but is not limited to, a display, speakers, a video/audio output terminal, a vibrator, and/or a printer. The storage unit 808 may include, but is not limited to, a magnetic disk, an optical disk. The communication unit 809 allows the device 800 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunications networks, and may include, but is not limited to, modems, network cards, infrared communication devices, wireless communication transceivers and/or chipsets, such as bluetooth (TM) devices, 1302.11 devices, WiFi devices, WiMax devices, cellular communication devices, and/or the like.
Computing unit 801 may be a variety of general and/or special purpose processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and the like. The computing unit 801 performs the various methods and processes described above, such as the methods 200 or 300. For example, in some embodiments, the methods 200 or 300 may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 808. In some embodiments, part or all of the computer program can be loaded and/or installed onto device 800 via ROM 802 and/or communications unit 809. When loaded into RAM 803 and executed by computing unit 801, may perform one or more of the steps of methods 200 or 300 described above. Alternatively, in other embodiments, the computing unit 801 may be configured to perform the methods 200 or 300 in any other suitable manner (e.g., by way of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, a server of a distributed system, or a server with a combined blockchain.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present disclosure may be performed in parallel, sequentially or in different orders, and are not limited herein as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved.
Although embodiments or examples of the present disclosure have been described with reference to the accompanying drawings, it is to be understood that the above-described methods, systems and apparatus are merely exemplary embodiments or examples and that the scope of the present invention is not limited by these embodiments or examples, but only by the claims as issued and their equivalents. Various elements in the embodiments or examples may be omitted or may be replaced with equivalents thereof. Further, the steps may be performed in an order different from that described in the present disclosure. Further, various elements in the embodiments or examples may be combined in various ways. It is important that as technology evolves, many of the elements described herein may be replaced with equivalent elements that appear after the present disclosure.

Claims (15)

1. A video detection method, comprising:
acquiring a plurality of video frames of a video to be detected;
inputting the plurality of video frames into a video detection model to obtain a recognition result which is output by the video detection model and corresponds to each video frame, wherein the video detection model is obtained by training a preset model based on training data including supervision data, and the supervision data includes label data indicating whether a sample video frame contains a key video element; and
and determining whether the video to be detected is a stretched video or not according to a plurality of identification results respectively corresponding to the plurality of video frames.
2. The method of claim 1, wherein the recognition result is a numerical value,
wherein determining whether the video to be detected is a stretched video comprises:
acquiring a first number of recognition results with the highest numerical value and a second number of recognition results with the lowest numerical value in the plurality of recognition results;
determining a first average value of the first number of recognition results and a second average value of the second number of recognition results respectively; and
and judging whether the video to be detected is a stretched video or not based on the first average value and the second average value.
3. The method of claim 2, wherein determining whether the video to be detected is a stretched video based on the first average value and the second average value comprises:
determining the video to be detected to be one of longitudinal stretching and transverse stretching in response to the first average value being greater than a first threshold value and the second average value being greater than a second threshold value; and
and determining the video to be detected to be the other one of the longitudinal stretching and the transverse stretching in response to the first average value being smaller than a third threshold value and the second average value being smaller than a fourth threshold value.
4. The method of claim 1, further comprising: pre-processing the plurality of video frames to input the pre-processed plurality of video frames into a video detection model,
wherein the pre-processing comprises one or more of the group consisting of: normalization, scaling with equal aspect ratio, and zero padding of the boundary.
5. The method of any of claims 1-4, wherein the key video element comprises a human face.
6. A model training method, comprising:
acquiring a plurality of pictures and determining whether each picture in the plurality of pictures is a stretched picture to generate training data;
determining whether each picture of the plurality of pictures contains a key picture element to generate supervisory data for the training data; and
training a preset model based on the training data including the supervision data so that the model recognizes whether the inputted picture is a stretched picture.
7. A video detection apparatus comprising:
an acquisition unit configured to acquire a plurality of video frames of a video to be detected;
the detection unit is configured to input the plurality of video frames into a video detection model, and obtain a recognition result which is output by the video detection model and corresponds to each video frame, wherein the video detection model is obtained by training a preset model based on training data including supervision data, and the supervision data includes label data indicating whether a sample video frame contains a key video element; and
a determining unit configured to determine whether the video to be detected is a stretched video according to a plurality of the recognition results respectively corresponding to the plurality of video frames.
8. The apparatus of claim 7, wherein the recognition result is a numerical value,
wherein the determination unit includes:
a unit configured to acquire a first number of recognition results with a highest numerical value and a second number of recognition results with a lowest numerical value from among the plurality of recognition results;
means for determining a first average of the first number of recognition results and a second average of the second number of recognition results, respectively; and
and a unit for judging whether the video to be detected is a stretched video or not based on the first average value and the second average value.
9. The apparatus of claim 8, wherein the means for determining whether the video to be detected is a stretched video based on the first average value and the second average value comprises:
means for determining that the video to be detected is one of longitudinally stretched and transversely stretched in response to the first average being greater than a first threshold and the second average being greater than a second threshold; and
means for determining that the video to be detected is the other of the longitudinal stretch and the transverse stretch in response to the first average being less than a third threshold and the second average being less than a fourth threshold.
10. The apparatus of claim 7, further comprising: means for pre-processing the plurality of video frames to input the pre-processed plurality of video frames into a video detection model,
wherein the pre-processing comprises one or more of the group consisting of: normalization, scaling with equal aspect ratio, and zero padding of the boundary.
11. The apparatus of any one of claims 7-10, wherein the key video element comprises a human face.
12. A model training apparatus comprising:
an acquisition unit configured to acquire a plurality of pictures and determine whether each of the plurality of pictures is a stretched picture to generate training data;
a determining unit configured to determine whether each of the plurality of pictures contains a key picture element to generate supervised data of the training data; and
a training unit configured to train a preset model based on the training data including the supervision data so that the model recognizes whether the inputted picture is a stretched picture.
13. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein
The memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-5 or claim 6.
14. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-5 or claim 6.
15. A computer program product comprising a computer program, wherein the computer program realizes the method of any one of claims 1-5 or claim 6 when executed by a processor.
CN202110865078.XA 2021-07-29 2021-07-29 Video detection method and device, electronic equipment and medium Active CN113486853B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110865078.XA CN113486853B (en) 2021-07-29 2021-07-29 Video detection method and device, electronic equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110865078.XA CN113486853B (en) 2021-07-29 2021-07-29 Video detection method and device, electronic equipment and medium

Publications (2)

Publication Number Publication Date
CN113486853A true CN113486853A (en) 2021-10-08
CN113486853B CN113486853B (en) 2024-02-27

Family

ID=77943513

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110865078.XA Active CN113486853B (en) 2021-07-29 2021-07-29 Video detection method and device, electronic equipment and medium

Country Status (1)

Country Link
CN (1) CN113486853B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114202728A (en) * 2021-12-10 2022-03-18 北京百度网讯科技有限公司 Video detection method, device, electronic equipment, medium and product

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170132472A1 (en) * 2015-11-05 2017-05-11 Qualcomm Incorporated Generic mapping for tracking target object in video sequence
CN108229331A (en) * 2017-03-16 2018-06-29 北京市商汤科技开发有限公司 Face false-proof detection method and system, electronic equipment, program and medium
US20190050969A1 (en) * 2017-08-10 2019-02-14 Wipro Limited Method and system for removal of rain streak distortion from a video
CN110889351A (en) * 2019-11-18 2020-03-17 中国科学院深圳先进技术研究院 Video detection method and device, terminal equipment and readable storage medium
CN110991307A (en) * 2019-11-27 2020-04-10 北京锐安科技有限公司 Face recognition method, device, equipment and storage medium
CN111291755A (en) * 2020-02-13 2020-06-16 腾讯科技(深圳)有限公司 Object detection model training method, object detection device, computer equipment and storage medium
CN111541911A (en) * 2020-04-21 2020-08-14 腾讯科技(深圳)有限公司 Video detection method and device, storage medium and electronic device
CN112150457A (en) * 2020-10-09 2020-12-29 北京小米移动软件有限公司 Video detection method, device and computer readable storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170132472A1 (en) * 2015-11-05 2017-05-11 Qualcomm Incorporated Generic mapping for tracking target object in video sequence
CN108229331A (en) * 2017-03-16 2018-06-29 北京市商汤科技开发有限公司 Face false-proof detection method and system, electronic equipment, program and medium
US20190050969A1 (en) * 2017-08-10 2019-02-14 Wipro Limited Method and system for removal of rain streak distortion from a video
CN110889351A (en) * 2019-11-18 2020-03-17 中国科学院深圳先进技术研究院 Video detection method and device, terminal equipment and readable storage medium
CN110991307A (en) * 2019-11-27 2020-04-10 北京锐安科技有限公司 Face recognition method, device, equipment and storage medium
CN111291755A (en) * 2020-02-13 2020-06-16 腾讯科技(深圳)有限公司 Object detection model training method, object detection device, computer equipment and storage medium
CN111541911A (en) * 2020-04-21 2020-08-14 腾讯科技(深圳)有限公司 Video detection method and device, storage medium and electronic device
CN112150457A (en) * 2020-10-09 2020-12-29 北京小米移动软件有限公司 Video detection method, device and computer readable storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
何志祥;胡俊伟;: "基于深度学习的无人机目标识别算法研究", 滨州学院学报, no. 02 *
张姣;肖江剑;周传宏;: "针对畸变行人检测的神经网络", 计量与测试技术, no. 09 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114202728A (en) * 2021-12-10 2022-03-18 北京百度网讯科技有限公司 Video detection method, device, electronic equipment, medium and product

Also Published As

Publication number Publication date
CN113486853B (en) 2024-02-27

Similar Documents

Publication Publication Date Title
CN112749685B (en) Video classification method, apparatus and medium
CN115422389B (en) Method and device for processing text image and training method of neural network
CN113256583A (en) Image quality detection method and apparatus, computer device, and medium
CN114445667A (en) Image detection method and method for training image detection model
CN112650885A (en) Video classification method, device, equipment and medium
CN112712498A (en) Vehicle damage assessment method and device executed by mobile terminal, mobile terminal and medium
US20230047628A1 (en) Human-object interaction detection
CN114004985A (en) Human interaction detection method, neural network and training method, device and medium thereof
CN114443989B (en) Ranking method, training method and device of ranking model, electronic equipment and medium
CN114547252A (en) Text recognition method and device, electronic equipment and medium
CN113810765B (en) Video processing method, device, equipment and medium
CN113723305A (en) Image and video detection method, device, electronic equipment and medium
CN113486853B (en) Video detection method and device, electronic equipment and medium
CN116152607A (en) Target detection method, method and device for training target detection model
CN114842476A (en) Watermark detection method and device and model training method and device
CN114140852B (en) Image detection method and device
CN114998963A (en) Image detection method and method for training image detection model
CN114494797A (en) Method and apparatus for training image detection model
CN114429678A (en) Model training method and device, electronic device and medium
CN114550269A (en) Mask wearing detection method, device and medium
CN113627534A (en) Method and device for identifying type of dynamic image and electronic equipment
CN114140851B (en) Image detection method and method for training image detection model
CN114120420B (en) Image detection method and device
CN115512131B (en) Image detection method and training method of image detection model
CN114842474B (en) Character recognition method, device, electronic equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant