CN113705386A - Video classification method and device, readable medium and electronic equipment - Google Patents

Video classification method and device, readable medium and electronic equipment Download PDF

Info

Publication number
CN113705386A
CN113705386A CN202110926870.1A CN202110926870A CN113705386A CN 113705386 A CN113705386 A CN 113705386A CN 202110926870 A CN202110926870 A CN 202110926870A CN 113705386 A CN113705386 A CN 113705386A
Authority
CN
China
Prior art keywords
video
transformation
target
videos
determining
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.)
Pending
Application number
CN202110926870.1A
Other languages
Chinese (zh)
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 Youzhuju Network Technology Co Ltd
Original Assignee
Beijing Youzhuju Network 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 Youzhuju Network Technology Co Ltd filed Critical Beijing Youzhuju Network Technology Co Ltd
Priority to CN202110926870.1A priority Critical patent/CN113705386A/en
Publication of CN113705386A publication Critical patent/CN113705386A/en
Priority to PCT/CN2022/109470 priority patent/WO2023016290A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • 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)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • Molecular Biology (AREA)
  • Computational Linguistics (AREA)
  • Software Systems (AREA)
  • Mathematical Physics (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Image Analysis (AREA)

Abstract

The disclosure relates to a video classification method, a video classification device, a readable medium and electronic equipment, and relates to the technical field of video processing, wherein the method comprises the following steps: the method comprises the steps of transforming videos to be classified through a target transformation group to obtain a plurality of transformation videos, determining video classification results of the videos to be classified through a trained video classification model according to the transformation videos, wherein the video classification model is used for determining target video characteristics corresponding to the transformation videos according to the transformation videos and determining the video classification results according to the target video characteristics, and the target video characteristics are characteristics with transformation invariance in the transformation videos. According to the video classification method and device, the video classification model is used for extracting the target video characteristics with the transformation invariance from the plurality of transformed videos, and video classification is carried out through the target video characteristics, so that the influence of rotation, scaling or affine transformation on video classification can be avoided, and the accuracy of video classification is improved.

Description

Video classification method and device, readable medium and electronic equipment
Technical Field
The present disclosure relates to the field of video processing technologies, and in particular, to a video classification method, an apparatus, a readable medium, and an electronic device.
Background
With the continuous development of internet technology, more and more videos are uploaded to the internet by users. In order to better analyze and manage videos in the internet, the videos need to be classified. Currently, video classification is generally performed by learning the spatiotemporal relationship implied in video using an end-to-end CNN (chinese Convolutional Neural Networks) model. However, in practical situations, since the orientation and distance of the video capture device are arbitrary, the captured video image may have some rotation, scaling or affine transformation with respect to the standard image. These transformations can make it difficult for the CNN model to perform feature learning uniformly, and affect the generalization ability of the CNN model, reducing the accuracy of video classification.
Disclosure of Invention
This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
In a first aspect, the present disclosure provides a video classification method, including:
transforming the video to be classified through the target transformation group to obtain a plurality of transformed videos;
determining a video classification result of the video to be classified according to the plurality of converted videos through a trained video classification model;
the video classification model is used for determining target video characteristics corresponding to the converted video according to the converted video and determining the video classification result according to the target video characteristics; the target video features are features with transform invariance in the transformed video.
In a second aspect, the present disclosure provides a video classification apparatus, the apparatus comprising:
the transformation module is used for transforming the video to be classified through the target transformation group to obtain a plurality of transformed videos;
the determining module is used for determining a video classification result of the video to be classified according to the plurality of converted videos through a trained video classification model;
the video classification model is used for determining target video characteristics corresponding to the converted video according to the converted video and determining the video classification result according to the target video characteristics; the target video features are features with transform invariance in the transformed video.
In a third aspect, the present disclosure provides a computer readable medium having stored thereon a computer program which, when executed by a processing apparatus, performs the steps of the method of the first aspect of the present disclosure.
In a fourth aspect, the present disclosure provides an electronic device comprising:
a storage device having a computer program stored thereon;
processing means for executing the computer program in the storage means to implement the steps of the method of the first aspect of the present disclosure.
According to the technical scheme, the video to be classified is transformed through the target transformation group to obtain a plurality of transformed videos, and then the video classification result of the video to be classified is determined through the trained video classification model according to the transformed videos, wherein the video classification model is used for determining the target video characteristics corresponding to the transformed videos according to the transformed videos and determining the video classification result according to the target video characteristics, and the target video characteristics are the characteristics with transformation invariance in the transformed videos. According to the video classification method and device, the target video characteristics with the transformation invariance are extracted from the plurality of transformed videos by using the video classification model, and the videos are classified through the target video characteristics, so that the influence of rotation, scaling or affine transformation on video classification can be avoided, and the accuracy of video classification is improved.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and features are not necessarily drawn to scale. In the drawings:
FIG. 1 is a flow diagram illustrating a method of video classification in accordance with an exemplary embodiment;
FIG. 2 is a flow chart of one step 101 shown in accordance with the embodiment shown in FIG. 1;
FIG. 3 is a flow chart illustrating one step 102 according to the embodiment shown in FIG. 1;
FIG. 4 is a flow diagram illustrating a method of training a video classification model according to an exemplary embodiment;
FIG. 5 is a block diagram illustrating a video classification apparatus according to an exemplary embodiment;
FIG. 6 is a block diagram of a transform module according to the embodiment shown in FIG. 5;
FIG. 7 is a block diagram of a determination module shown in accordance with the embodiment shown in FIG. 5;
FIG. 8 is a block diagram illustrating an electronic device in accordance with an example embodiment.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and examples of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
Fig. 1 is a flow diagram illustrating a method of video classification according to an example embodiment. As shown in fig. 1, the method may include the steps of:
and 101, transforming the video to be classified through a target transformation group to obtain a plurality of transformed videos.
For example, in order to avoid the influence of rotation, scaling, and affine transformation on video classification, video classification may be performed by extracting features in the video that have transformation invariance to a specified type of transformation (the specified type of transformation may be, for example, rotation transformation, scaling transformation, or general affine transformation, etc.). Specifically, firstly, it may be determined in advance according to a priori knowledge which specified types of transformations need to extract features with transformation invariance, and a preset transformation group corresponding to each specified type of transformation is generated according to the specified types of transformations. And the preset transformation group corresponding to each specified type of transformation is a group formed by a plurality of transformations of the specified type. For example, in the case of a transformation of a specified type, the preset transformation group may be a rotation group composed of a plurality of rotation transformations, in the case of a transformation of a specified type, the preset transformation group may be a scaling group composed of a plurality of scaling transformations, and in the case of an affine transformation, the preset transformation group may be an affine transformation group composed of a plurality of affine transformations.
Then, a video to be classified may be acquired, and a target transformation group may be determined from a plurality of preset transformation groups generated in advance according to the video to be classified. There are various implementations of determining the target transformation group, one implementation is to select the target transformation group from a plurality of preset transformation groups according to the characteristics of the video to be classified, for example, if the size of an object (such as a person or an article) in the video to be classified is large, a scaling group may be selected as the target transformation group. And then, the videos to be classified are respectively transformed through a plurality of transformations included by the target transformation group, so that a transformation video corresponding to each transformation is obtained.
And step 102, determining a video classification result of the video to be classified according to the plurality of converted videos through the trained video classification model.
The video classification model is used for determining target video characteristics corresponding to the converted video according to the converted video and determining a video classification result according to the target video characteristics, wherein the target video characteristics are characteristics with conversion invariance in the converted video.
For example, after the plurality of transformed videos are acquired, the plurality of transformed videos may be input into a trained video classification model. And respectively extracting the video characteristics of each transformed video by using a video classification model, and performing maximum pooling on the extracted video characteristics of all the transformed videos to obtain target video characteristics with transformation invariance in the transformed videos. For example, when the target transformation group is a rotation group, the plurality of transformation videos are actually obtained by performing different rotation transformations on the video to be classified, and at this time, the obtained target video features are actually features of the video to be classified, which have invariance to the rotation transformations. Then, the video classification model can determine a video classification result of the video to be classified from a plurality of preset video types according to the target video characteristics. For example, in a scene of performing video content security classification on a video to be classified, the plurality of preset video types may include a normal video and a plurality of abnormal video types.
It should be noted that, in the present disclosure, the video to be classified is actually taken as a whole, and the video classification result of the video to be classified is obtained through the target transformation group and the video classification model. In addition, a specified number of frames of video images can be extracted from the video to be classified, the video classification result of each frame of video image is obtained through the target transformation group and the video classification model aiming at each frame of video image, and then the video classification result of the video to be classified can be determined according to the video classification results of all the frames of video images. Further, the video classification method of the present disclosure may be applied to not only classifying videos, but also classifying images, which is not specifically limited by the present disclosure.
In summary, in the present disclosure, a video to be classified is transformed through a target transformation group to obtain a plurality of transformed videos, and then a video classification result of the video to be classified is determined according to the plurality of transformed videos through a trained video classification model, where the video classification model is used to determine a target video feature corresponding to the transformed video according to the transformed video, and determine the video classification result according to the target video feature, and the target video feature is a feature with transformation invariance in the transformed video. According to the video classification method and device, the target video characteristics with the transformation invariance are extracted from the plurality of transformed videos by using the video classification model, the video classification is carried out through the target video characteristics, the influence of rotation, scaling or affine transformation on the video classification can be avoided, and the accuracy of the video classification is improved.
Fig. 2 is a flow chart illustrating a step 101 according to the embodiment shown in fig. 1. As shown in fig. 2, step 101 may include the steps of:
in step 1011, a target transform group is determined from the plurality of preset transform groups. The preset transformation groups comprise a rotation group, a scaling group and an affine transformation group, and each preset transformation group comprises a plurality of transformation matrixes.
For example, a preset recognition algorithm may be first used to determine object information corresponding to a target object in a video to be classified. Then, a target transform group may be determined from the plurality of preset transform groups according to the object information. The object information may include a position, a direction, and a size of the target object, and each preset transformation group may include a plurality of transformations, each transformation corresponding to one transformation matrix.
For example, a standard image may be preset, and if the direction of the target object in the video to be classified is different from the direction of the object in the standard image by a large amount, a rotation group may be selected as the target transformation group, and if the size of the target object in the video to be classified is different from the size of the object in the standard image by a large amount, a scaling group may be selected as the target transformation group.
Step 1012, transforming the video to be classified respectively through each target transformation matrix in the target transformation group to obtain a transformed video corresponding to each target transformation matrix.
Specifically, taking the target transform group as the rotation group, and the rotation group includes 4 rotation transforms as an example, if the 4 rotation transforms respectively rotate the video to be classified by 45 °, 90 °, 135 °, and 180 ° clockwise, the video to be classified may be transformed (the transform at this time is a rotation transform) by respectively transforming the corresponding target transform matrix with each rotation transform in the target transform group after the target transform group is determined, so as to obtain 4 transform videos respectively rotating the video to be classified by 45 °, 90 °, 135 °, and 180 ° clockwise.
Fig. 3 is a flow chart illustrating one step 102 according to the embodiment shown in fig. 1. As shown in fig. 3, the video classification model includes a twin network including a plurality of neural sub-networks, a max-pooling layer, and a classifier, and the transform video corresponds to the neural sub-networks one-to-one. Step 102 may include the steps of:
step 1021, inputting each transformed video into the neural sub-network corresponding to the transformed video to extract the video features of the transformed video.
And 1022, performing maximum pooling processing on the video features of each converted video through the maximum pooling layer to obtain target video features.
And step 1023, determining a video classification result according to the target video characteristics through a classifier.
In one scenario, to ensure the accuracy of the video classification result, it is necessary to avoid the influence of rotation, scaling and affine transformation on the video classification. Thus, a video classification model with invariance to rotation transformation, scaling transformation, and affine transformation can be constructed. Specifically, a video classification model may be constructed from the twin network, the maximum pooling layer, and the classifier. The twin network comprises a plurality of neural sub-networks, and the neural sub-networks share network weights and network parameters. The twin network may employ, for example, 3D-CNN or dual stream CNN, and the classifier may employ a linear classifier.
After a plurality of transformed videos are acquired, each transformed video can be input into a neural sub-network corresponding to the transformed video, so that n-dimensional video features of the transformed video can be obtained. The video features of each transformed video can then be input into a max-pooling layer, which performs a max-pooling operation on the video features of the transformed videos obtained by the respective neural sub-networks element by element, and outputs the target video features. The target video features can be input into a classifier, and the classifier determines a video classification result according to the target video features.
FIG. 4 is a flow diagram illustrating training a video classification model according to an example embodiment. As shown in fig. 4, the video classification model is obtained by:
step 201, a training sample set is obtained.
The training sample set comprises training videos and training video classification results corresponding to the training videos.
Step 202, transforming the training videos through each preset transformation group to obtain a plurality of training transformation videos corresponding to each preset transformation group.
And step 203, training a preset model according to the training transformation videos and the training video classification results to obtain a video classification model.
For example, when a video classification model is trained, a video may be collected from a traffic line first, and the collected video may be divided into a training sample set and a testing sample set. The training sample set comprises training videos and training video classification results corresponding to the training videos, and the testing sample set comprises testing videos and testing video classification results corresponding to the testing videos. Secondly, the training videos can be transformed through each preset transformation group, and a plurality of training transformation videos corresponding to each preset transformation group are obtained. Then, aiming at each preset transformation group, a plurality of training transformation videos corresponding to the preset transformation group are used as the input of a preset model, the classification result of the training videos is used as the output of the preset model, and optimizers such as SGD (Chinese Stochastic Gradient Descent) are used for training the preset model to obtain a video classification model. For example, the preset model may include a twin network, a maximum pooling layer, and a classifier, the twin network may include a plurality of neural sub-networks, and when the preset model is trained, the training transformation videos may be respectively input into different neural sub-networks to perform video feature extraction, and the training video classification result is used as an output of the classifier to train the preset model.
Then, a performance test can be performed on the obtained video classification model by using the test sample set (for example, the performance of the video classification model can be judged by the accuracy of the video classification result output by the video classification model), and if the performance of the video classification model does not meet the requirement, the video classification model is trained again until the performance of the video classification model meets the requirement.
In summary, in the present disclosure, a video to be classified is transformed through a target transformation group to obtain a plurality of transformed videos, and then a video classification result of the video to be classified is determined according to the plurality of transformed videos through a trained video classification model, where the video classification model is used to determine a target video feature corresponding to the transformed video according to the transformed video, and determine the video classification result according to the target video feature, and the target video feature is a feature with transformation invariance in the transformed video. According to the video classification method and device, the target video characteristics with the transformation invariance are extracted from the plurality of transformed videos by using the video classification model, the video classification is carried out through the target video characteristics, the influence of rotation, scaling or affine transformation on the video classification can be avoided, and the accuracy of the video classification is improved.
Fig. 5 is a block diagram illustrating a video classification device according to an exemplary embodiment. As shown in fig. 5, the apparatus 300 includes:
the transformation module 301 is configured to transform the video to be classified through the target transformation group to obtain a plurality of transformed videos.
The determining module 302 is configured to determine a video classification result of the video to be classified according to the plurality of transformed videos through the trained video classification model.
The video classification model is used for determining target video characteristics corresponding to the converted video according to the converted video and determining a video classification result according to the target video characteristics, wherein the target video characteristics are characteristics with conversion invariance in the converted video.
Fig. 6 is a block diagram of a transform module according to the embodiment shown in fig. 5. As shown in fig. 6, the transform module 301 includes:
the determining sub-module 3011 is configured to determine a target transformation group from a plurality of preset transformation groups, where the plurality of preset transformation groups include a rotation group, a scaling group, and an affine transformation group, and each preset transformation group includes a plurality of transformation matrices.
And the transformation submodule 3012 is configured to transform the video to be classified respectively through each target transformation matrix in the target transformation group, so as to obtain a transformed video corresponding to each target transformation matrix.
Optionally, the determining sub-module 3011 is configured to:
and determining object information corresponding to the target object in the video to be classified, wherein the object information comprises the position, the direction and the size of the target object.
And determining a target transformation group from a plurality of preset transformation groups according to the object information.
FIG. 7 is a block diagram illustrating a determination module according to the embodiment shown in FIG. 5. As shown in fig. 7, the video classification model includes a twin network, a maximum pooling layer and a classifier, the twin network includes a plurality of neural sub-networks, the transformed video corresponds to the neural sub-networks one by one, and the determining module 302 includes:
and the feature extraction sub-module 3021 is configured to input each transformed video into a corresponding neural sub-network of the transformed video to extract video features of the transformed video.
The pooling submodule 3022 is configured to perform maximal pooling on the video feature of each transformed video through the maximal pooling layer to obtain a target video feature.
And the classification submodule 3023 is configured to determine a video classification result according to the target video feature through the classifier.
Optionally, the determining module 302 is configured to train to obtain the video classification model by:
and acquiring a training sample set, wherein the training sample set comprises a training video and a training video classification result corresponding to the training video.
And transforming the training videos through each preset transformation group to obtain a plurality of training transformation videos corresponding to each preset transformation group.
And training the preset model according to the training transformation videos and the training video classification results to obtain a video classification model.
In summary, in the present disclosure, a video to be classified is transformed through a target transformation group to obtain a plurality of transformed videos, and then a video classification result of the video to be classified is determined according to the plurality of transformed videos through a trained video classification model, where the video classification model is used to determine a target video feature corresponding to the transformed video according to the transformed video, and determine the video classification result according to the target video feature, and the target video feature is a feature with transformation invariance in the transformed video. According to the video classification method and device, the target video characteristics with the transformation invariance are extracted from the plurality of transformed videos by using the video classification model, the video classification is carried out through the target video characteristics, the influence of rotation, scaling or affine transformation on the video classification can be avoided, and the accuracy of the video classification is improved.
Referring now to fig. 8, a schematic diagram of an electronic device (e.g., the terminal device or the server of fig. 1) 400 suitable for implementing embodiments of the present disclosure is shown. The terminal device in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a fixed terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 8 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 8, electronic device 400 may include a processing means (e.g., central processing unit, graphics processor, etc.) 401 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)402 or a program loaded from a storage means 408 into a Random Access Memory (RAM) 403. In the RAM 403, various programs and data necessary for the operation of the electronic apparatus 400 are also stored. The processing device 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An input/output (I/O) interface 405 is also connected to bus 404.
Generally, the following devices may be connected to the I/O interface 405: input devices 406 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 407 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 408 including, for example, tape, hard disk, etc.; and a communication device 409. The communication means 409 may allow the electronic device 400 to communicate wirelessly or by wire with other devices to exchange data. While fig. 8 illustrates an electronic device 400 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such embodiments, the computer program may be downloaded and installed from a network through the communication device 409, or from the storage device 408, or from the ROM 402. The computer program performs the above-described functions defined in the methods of the embodiments of the present disclosure when executed by the processing device 401.
It should be noted that the computer readable medium mentioned in the present disclosure may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having 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. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: transforming the video to be classified through the target transformation group to obtain a plurality of transformed videos; determining a video classification result of the video to be classified according to the plurality of converted videos through a trained video classification model; the video classification model is used for determining target video characteristics corresponding to the converted video according to the converted video and determining the video classification result according to the target video characteristics; the target video features are features with transform invariance in the transformed video.
Computer program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present disclosure may be implemented by software or hardware. The name of a module does not in some cases form a limitation on the module itself, for example, a transformation module may also be described as a "module transforming a video to be classified to obtain a plurality of transformed videos".
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
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 compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
Example 1 provides a video classification method according to one or more embodiments of the present disclosure, including: transforming the video to be classified through the target transformation group to obtain a plurality of transformed videos; determining a video classification result of the video to be classified according to the plurality of converted videos through a trained video classification model; the video classification model is used for determining target video characteristics corresponding to the converted video according to the converted video and determining the video classification result according to the target video characteristics; the target video features are features with transform invariance in the transformed video.
Example 2 provides the method of example 1, wherein transforming the video to be classified by the target transformation group to obtain a plurality of transformed videos includes: determining the target transformation group from a plurality of preset transformation groups; the preset transformation groups comprise a rotation group, a scaling group and an affine transformation group, and each preset transformation group comprises a plurality of transformation matrixes; and transforming the videos to be classified respectively through each target transformation matrix in the target transformation group to obtain the transformation videos corresponding to each target transformation matrix.
Example 3 provides the method of example 2, wherein determining the target transformation group from a plurality of preset transformation groups, according to one or more embodiments of the present disclosure, comprises: determining object information corresponding to a target object in the video to be classified, wherein the object information comprises the position, the direction and the size of the target object; and determining the target transformation group from a plurality of preset transformation groups according to the object information.
Example 4 provides the method of example 1, the video classification model including a twin network, the twin network including a plurality of neural sub-networks, a max-pooling layer, and a classifier, the transformed video in one-to-one correspondence with the neural sub-networks; determining a video classification result of the video to be classified according to the plurality of converted videos through a trained video classification model, wherein the determining comprises the following steps: inputting each transformed video into a neural sub-network corresponding to the transformed video so as to extract video features of the transformed video; performing maximum pooling processing on the video features of each converted video through the maximum pooling layer to obtain the target video features; and determining the video classification result according to the target video characteristics through the classifier.
Example 5 provides the method of example 1, the video classification model obtained by: acquiring a training sample set; the training sample set comprises training videos and training video classification results corresponding to the training videos; transforming the training videos through each preset transformation group to obtain a plurality of training transformation videos corresponding to each preset transformation group; and training a preset model according to the training transformation videos and the training video classification result to obtain the video classification model.
Example 6 provides, in accordance with one or more embodiments of the present disclosure, a video classification apparatus, the apparatus comprising: the transformation module is used for transforming the video to be classified through the target transformation group to obtain a plurality of transformed videos; the determining module is used for determining a video classification result of the video to be classified according to the plurality of converted videos through a trained video classification model; the video classification model is used for determining target video characteristics corresponding to the converted video according to the converted video and determining the video classification result according to the target video characteristics; the target video feature is a feature having transform invariance in the transform video.
Example 7 provides the apparatus of example 6, the transformation module comprising, in accordance with one or more embodiments of the present disclosure: the determining submodule is used for determining the target transformation group from a plurality of preset transformation groups; the preset transformation groups comprise a rotation group, a scaling group and an affine transformation group, and each preset transformation group comprises a plurality of transformation matrixes; and the transformation submodule is used for respectively transforming the video to be classified through each target transformation matrix in the target transformation group to obtain a transformation video corresponding to each target transformation matrix.
Example 8 provides the apparatus of example 6, the video classification model including a twin network, the twin network including a plurality of neural sub-networks, a max-pooling layer, and a classifier, the transformed video in one-to-one correspondence with the neural sub-networks; the determining module comprises: the feature extraction submodule is used for inputting each transformed video into a neural sub-network corresponding to the transformed video so as to extract the video features of the transformed video; the pooling submodule is used for performing maximum pooling processing on the video characteristics of each converted video through the maximum pooling layer to obtain the target video characteristics; and the classification submodule is used for determining the video classification result according to the target video characteristics through the classifier.
Example 9 provides a computer readable medium having stored thereon a computer program that, when executed by a processing apparatus, implements the steps of the methods described in examples 1-5, in accordance with one or more embodiments of the present disclosure.
Example 10 provides, in accordance with one or more embodiments of the present disclosure, an electronic device comprising: a storage device having a computer program stored thereon; processing means for executing the computer program in the storage means to implement the steps of the methods of examples 1 to 5.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present disclosure.
Further, while operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims. With regard to the apparatus in the above embodiments, the specific manner in which each module performs operations has been described in detail in the embodiments related to the method, and will not be described in detail here.

Claims (10)

1. A method for video classification, the method comprising:
transforming the video to be classified through the target transformation group to obtain a plurality of transformed videos;
determining a video classification result of the video to be classified according to the plurality of converted videos through a trained video classification model;
the video classification model is used for determining target video characteristics corresponding to the converted video according to the converted video and determining the video classification result according to the target video characteristics; the target video features are features with transform invariance in the transformed video.
2. The method of claim 1, wherein transforming the video to be classified by the target transform group to obtain a plurality of transformed videos comprises:
determining the target transformation group from a plurality of preset transformation groups; the preset transformation groups comprise a rotation group, a scaling group and an affine transformation group, and each preset transformation group comprises a plurality of transformation matrixes;
and transforming the videos to be classified respectively through each target transformation matrix in the target transformation group to obtain the transformation videos corresponding to each target transformation matrix.
3. The method of claim 2, wherein determining the target transform group from a plurality of predetermined transform groups comprises:
determining object information corresponding to a target object in the video to be classified, wherein the object information comprises the position, the direction and the size of the target object;
and determining the target transformation group from a plurality of preset transformation groups according to the object information.
4. The method of claim 1, wherein the video classification model comprises a twin network, a max pooling layer, and a classifier, wherein the twin network comprises a plurality of neural sub-networks, and wherein the transformed video corresponds to the neural sub-networks one-to-one; determining a video classification result of the video to be classified according to the plurality of transformed videos through a trained video classification model, wherein the determining comprises the following steps:
inputting each transformed video into a neural sub-network corresponding to the transformed video so as to extract video features of the transformed video;
performing maximum pooling processing on the video features of each converted video through the maximum pooling layer to obtain the target video features;
and determining the video classification result according to the target video characteristics through the classifier.
5. The method of claim 1, wherein the video classification model is obtained by:
acquiring a training sample set; the training sample set comprises training videos and training video classification results corresponding to the training videos;
transforming the training videos through each preset transformation group to obtain a plurality of training transformation videos corresponding to each preset transformation group;
and training a preset model according to the training transformation videos and the training video classification result to obtain the video classification model.
6. An apparatus for video classification, the apparatus comprising:
the transformation module is used for transforming the video to be classified through the target transformation group to obtain a plurality of transformed videos;
the determining module is used for determining a video classification result of the video to be classified according to the plurality of converted videos through a trained video classification model;
the video classification model is used for determining target video characteristics corresponding to the converted video according to the converted video and determining the video classification result according to the target video characteristics; the target video features are features with transform invariance in the transformed video.
7. The apparatus of claim 6, wherein the transformation module comprises:
the determining submodule is used for determining the target transformation group from a plurality of preset transformation groups; the preset transformation groups comprise a rotation group, a scaling group and an affine transformation group, and each preset transformation group comprises a plurality of transformation matrixes;
and the transformation submodule is used for respectively transforming the videos to be classified through each target transformation matrix in the target transformation group to obtain a transformation video corresponding to each target transformation matrix.
8. The apparatus of claim 6, wherein the video classification model comprises a twin network, a max pooling layer, and a classifier, wherein the twin network comprises a plurality of neural sub-networks, and wherein the transformed video corresponds to the neural sub-networks one-to-one; the determining module comprises:
the feature extraction sub-module is used for inputting each transformed video into a neural sub-network corresponding to the transformed video so as to extract the video features of the transformed video;
the pooling submodule is used for performing maximum pooling processing on the video characteristics of each converted video through the maximum pooling layer to obtain the target video characteristics;
and the classification submodule is used for determining the video classification result according to the target video characteristics through the classifier.
9. A computer-readable medium, on which a computer program is stored, characterized in that the program, when being executed by processing means, carries out the steps of the method of any one of claims 1 to 5.
10. An electronic device, comprising:
a storage device having a computer program stored thereon;
processing means for executing the computer program in the storage means to carry out the steps of the method according to any one of claims 1 to 5.
CN202110926870.1A 2021-08-12 2021-08-12 Video classification method and device, readable medium and electronic equipment Pending CN113705386A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202110926870.1A CN113705386A (en) 2021-08-12 2021-08-12 Video classification method and device, readable medium and electronic equipment
PCT/CN2022/109470 WO2023016290A1 (en) 2021-08-12 2022-08-01 Video classification method and apparatus, readable medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110926870.1A CN113705386A (en) 2021-08-12 2021-08-12 Video classification method and device, readable medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN113705386A true CN113705386A (en) 2021-11-26

Family

ID=78652514

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110926870.1A Pending CN113705386A (en) 2021-08-12 2021-08-12 Video classification method and device, readable medium and electronic equipment

Country Status (2)

Country Link
CN (1) CN113705386A (en)
WO (1) WO2023016290A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023016290A1 (en) * 2021-08-12 2023-02-16 北京有竹居网络技术有限公司 Video classification method and apparatus, readable medium and electronic device

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109145927A (en) * 2017-06-16 2019-01-04 杭州海康威视数字技术股份有限公司 The target identification method and device of a kind of pair of strain image
CN109840556A (en) * 2019-01-24 2019-06-04 浙江大学 A kind of image classification recognition methods based on twin network
CN110287836A (en) * 2019-06-14 2019-09-27 北京迈格威科技有限公司 Image classification method, device, computer equipment and storage medium
CN110347876A (en) * 2019-07-12 2019-10-18 Oppo广东移动通信有限公司 Video classification methods, device, terminal device and computer readable storage medium
CN110377787A (en) * 2019-06-21 2019-10-25 北京奇艺世纪科技有限公司 A kind of video classification methods, device and computer readable storage medium
CN111612093A (en) * 2020-05-29 2020-09-01 Oppo广东移动通信有限公司 Video classification method, video classification device, electronic equipment and storage medium
CN113033677A (en) * 2021-03-30 2021-06-25 北京有竹居网络技术有限公司 Video classification method and device, electronic equipment and storage medium

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105160358B (en) * 2015-09-07 2018-08-17 苏州大学张家港工业技术研究院 A kind of image classification method and system
CN108875787B (en) * 2018-05-23 2020-07-14 北京市商汤科技开发有限公司 Image recognition method and device, computer equipment and storage medium
CN108985217A (en) * 2018-07-10 2018-12-11 常州大学 A kind of traffic sign recognition method and system based on deep space network
CN110070067B (en) * 2019-04-29 2021-11-12 北京金山云网络技术有限公司 Video classification method, training method and device of video classification method model and electronic equipment
CN111353548B (en) * 2020-03-11 2020-10-20 中国人民解放军军事科学院国防科技创新研究院 Robust feature deep learning method based on confrontation space transformation network
CN111401452B (en) * 2020-03-17 2022-04-26 北京大学 Image classification method of equal-variation convolution network model based on partial differential operator
CN112257753B (en) * 2020-09-23 2023-04-07 北京大学 Image classification method of generalized equal-variation convolution network model based on partial differential operator
CN112990315B (en) * 2021-03-17 2023-10-20 北京大学 3D shape image classification method of constant-variation 3D convolution network based on partial differential operator
CN113705386A (en) * 2021-08-12 2021-11-26 北京有竹居网络技术有限公司 Video classification method and device, readable medium and electronic equipment

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109145927A (en) * 2017-06-16 2019-01-04 杭州海康威视数字技术股份有限公司 The target identification method and device of a kind of pair of strain image
CN109840556A (en) * 2019-01-24 2019-06-04 浙江大学 A kind of image classification recognition methods based on twin network
CN110287836A (en) * 2019-06-14 2019-09-27 北京迈格威科技有限公司 Image classification method, device, computer equipment and storage medium
CN110377787A (en) * 2019-06-21 2019-10-25 北京奇艺世纪科技有限公司 A kind of video classification methods, device and computer readable storage medium
CN110347876A (en) * 2019-07-12 2019-10-18 Oppo广东移动通信有限公司 Video classification methods, device, terminal device and computer readable storage medium
CN111612093A (en) * 2020-05-29 2020-09-01 Oppo广东移动通信有限公司 Video classification method, video classification device, electronic equipment and storage medium
CN113033677A (en) * 2021-03-30 2021-06-25 北京有竹居网络技术有限公司 Video classification method and device, electronic equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
刘国华: "《HALCON编程及工程应用》", pages: 124 - 126 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023016290A1 (en) * 2021-08-12 2023-02-16 北京有竹居网络技术有限公司 Video classification method and apparatus, readable medium and electronic device

Also Published As

Publication number Publication date
WO2023016290A1 (en) 2023-02-16

Similar Documents

Publication Publication Date Title
CN110298413B (en) Image feature extraction method and device, storage medium and electronic equipment
CN111368685B (en) Method and device for identifying key points, readable medium and electronic equipment
CN111369427B (en) Image processing method, image processing device, readable medium and electronic equipment
CN110826567B (en) Optical character recognition method, device, equipment and storage medium
CN114282581B (en) Training sample acquisition method and device based on data enhancement and electronic equipment
CN111784712B (en) Image processing method, device, equipment and computer readable medium
WO2022252881A1 (en) Image processing method and apparatus, and readable medium and electronic device
CN113313064A (en) Character recognition method and device, readable medium and electronic equipment
CN110991373A (en) Image processing method, image processing apparatus, electronic device, and medium
CN113033580B (en) Image processing method, device, storage medium and electronic equipment
WO2022171036A1 (en) Video target tracking method, video target tracking apparatus, storage medium, and electronic device
CN113449070A (en) Multimodal data retrieval method, device, medium and electronic equipment
CN112418249A (en) Mask image generation method and device, electronic equipment and computer readable medium
CN114581336A (en) Image restoration method, device, equipment, medium and product
CN114692085A (en) Feature extraction method and device, storage medium and electronic equipment
CN113705386A (en) Video classification method and device, readable medium and electronic equipment
CN112800276A (en) Video cover determination method, device, medium and equipment
CN110765304A (en) Image processing method, image processing device, electronic equipment and computer readable medium
CN110852242A (en) Watermark identification method, device, equipment and storage medium based on multi-scale network
CN111737575B (en) Content distribution method, content distribution device, readable medium and electronic equipment
CN113033552B (en) Text recognition method and device and electronic equipment
CN115270981A (en) Object processing method and device, readable medium and electronic equipment
CN110334763B (en) Model data file generation method, model data file generation device, model data file identification device, model data file generation apparatus, model data file identification apparatus, and model data file identification medium
CN114612909A (en) Character recognition method and device, readable medium and electronic equipment
CN114004229A (en) Text recognition method and device, readable medium and electronic equipment

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