CN110569702B - Video stream processing method and device - Google Patents

Video stream processing method and device Download PDF

Info

Publication number
CN110569702B
CN110569702B CN201910114910.5A CN201910114910A CN110569702B CN 110569702 B CN110569702 B CN 110569702B CN 201910114910 A CN201910114910 A CN 201910114910A CN 110569702 B CN110569702 B CN 110569702B
Authority
CN
China
Prior art keywords
image frame
video stream
feature
image frames
matrix
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.)
Active
Application number
CN201910114910.5A
Other languages
Chinese (zh)
Other versions
CN110569702A (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.)
Advanced New Technologies Co Ltd
Advantageous New Technologies Co Ltd
Original Assignee
Advanced New Technologies 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 Advanced New Technologies Co Ltd filed Critical Advanced New Technologies Co Ltd
Priority to CN201910114910.5A priority Critical patent/CN110569702B/en
Priority to TW108129775A priority patent/TWI750498B/en
Priority to US16/703,088 priority patent/US10943126B2/en
Publication of CN110569702A publication Critical patent/CN110569702A/en
Priority to EP20709433.5A priority patent/EP3857440A1/en
Priority to SG11202104426WA priority patent/SG11202104426WA/en
Priority to PCT/US2020/017007 priority patent/WO2020167581A1/en
Application granted granted Critical
Publication of CN110569702B publication Critical patent/CN110569702B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/40Scenes; Scene-specific elements in video content
    • G06V20/46Extracting features or characteristics from the video content, e.g. video fingerprints, representative shots or key frames
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/70Information retrieval; Database structures therefor; File system structures therefor of video data
    • G06F16/78Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • 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
    • G06F18/2413Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on distances to training or reference patterns
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/20Analysis of motion
    • G06T7/269Analysis of motion using gradient-based methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • G06V10/443Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components by matching or filtering
    • G06V10/449Biologically inspired filters, e.g. difference of Gaussians [DoG] or Gabor filters
    • G06V10/451Biologically inspired filters, e.g. difference of Gaussians [DoG] or Gabor filters with interaction between the filter responses, e.g. cortical complex cells
    • G06V10/454Integrating the filters into a hierarchical structure, e.g. convolutional neural networks [CNN]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/10Terrestrial scenes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/40Scenes; Scene-specific elements in video content
    • G06V20/41Higher-level, semantic clustering, classification or understanding of video scenes, e.g. detection, labelling or Markovian modelling of sport events or news items
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10016Video; Image sequence
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20084Artificial neural networks [ANN]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30248Vehicle exterior or interior

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Evolutionary Computation (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Artificial Intelligence (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Computing Systems (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Molecular Biology (AREA)
  • Medical Informatics (AREA)
  • Biomedical Technology (AREA)
  • Computational Linguistics (AREA)
  • Biophysics (AREA)
  • Biodiversity & Conservation Biology (AREA)
  • Mathematical Physics (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • Quality & Reliability (AREA)
  • Library & Information Science (AREA)
  • Image Analysis (AREA)

Abstract

The embodiment of the specification provides a video stream processing method and device. The method comprises the steps of deploying a plurality of feature extraction models, respectively extracting features of image frames in a video stream to obtain feature vectors of the image frames, combining the feature vectors together, constructing a feature matrix with a preset size aiming at the video stream, and creatively processing the feature matrix by using a pre-trained convolutional neural network model to obtain a processing result of the video stream. In the process, the complexity of model labeling can be reduced, and the relevance between features is mined for time domain video data through the processing of a convolutional neural network, so that more effective video processing is performed.

Description

Video stream processing method and device
Technical Field
One or more embodiments of the present specification relate to the field of computer technology, and in particular, to a method and apparatus for processing a video stream by a computer.
Background
Convolutional Neural Networks (CNN) are a kind of feed-forward Neural network, and artificial neurons can respond to surrounding cells and can perform large-scale image processing. The convolutional neural network usually takes a multi-image frame image sequence as input, can simultaneously extract space dimension abstract features and time dimension abstract features in the image sequence, excavates hidden features in the image, and has important application in the fields of image sequence analysis such as video classification, action recognition and the like. In the conventional technology, the analysis method of a single picture through a convolutional neural network can usually mine the characteristics of the single picture in certain directions. In the field of video processing, analysis of a single picture is also often performed. Therefore, there is a need for an improved scheme that can provide a more efficient video stream processing scheme utilizing convolutional neural networks.
Disclosure of Invention
One or more embodiments of the present specification describe a method and apparatus for processing a video stream to address some of the deficiencies of the prior art.
According to a first aspect, there is provided a method of processing a video stream, the method comprising: acquiring a video stream to be processed; respectively extracting the characteristics of S image frames in the video stream to generate S characteristic vectors with N dimensions; arranging the S N-dimensional feature vectors according to the time sequence of the corresponding image frames to generate a feature matrix, wherein the feature matrix is provided with N rows and at least S columns; and processing the characteristic matrix by utilizing a pre-trained convolutional neural network to obtain a processing result of the video stream.
In some embodiments, the S image frames comprise a first image frame, and the performing feature extraction on the S image frames in the video stream respectively comprises: determining a change characteristic of the first image frame based on a comparison with a previous image frame of the first image frame.
In some embodiments, the S image frames comprise a first image frame, and the performing feature extraction on the S image frames in the video stream respectively further comprises: taking optical flow changes from the previous image frame to the first image frame as the change feature.
In some embodiments, the S image frames comprise a first image frame, and the performing feature extraction on the S image frames in the video stream respectively further comprises:
determining SSIM indexes of the first image frame and the previous image frame determined by a structural similarity model as the change characteristics of the first image frame.
In some embodiments, the S image frames comprise a first image frame, and the performing feature extraction on the S image frames in the video stream respectively further comprises:
determining a projection matrix of the previous image frame to the first image frame;
and taking the projection matrix as the change characteristic.
In some embodiments, the change characteristic is determined to comprise a predetermined value in the case that the first image frame is the first image frame of the video stream, or the previous image frame and the first image frame are determined to be the same image frame.
In some embodiments, the feature extraction on the S image frames in the video stream respectively comprises:
and performing target recognition on a first image frame in the S image frames, and determining a target feature of the first image frame.
In some embodiments, the video stream is a video stream captured for a damaged vehicle, and the target features include one or more of damaged parts, damaged materials, and damaged categories.
In some embodiments, the feature extraction on the S image frames in the video stream respectively comprises: and detecting one or more items of blurring, containing a target, enough illumination and preset shooting angle for a first image frame in the S image frames, and taking the detection result as the corresponding characteristic of the first image frame.
In some embodiments, where the plurality of features are decimated for a first image frame of the S image frames, the generating S N-dimensional feature vectors comprises: and combining the characteristic values corresponding to a plurality of characteristics of the first image frame to generate an N-dimensional characteristic vector.
In some embodiments, the arranging the S N-dimensional feature vectors in a temporal order of the corresponding image frames, and the generating the feature matrix includes: and supplementing M-S eigenvectors in the S N-dimensional eigenvectors by utilizing an interpolation mode to generate the eigenvector matrix with N rows and M columns.
In some embodiments, for the first interpolated position, the interpolation mode comprises one of:
taking the feature vector nearest to the first interpolation position as the feature vector inserted at the first interpolation position;
and respectively carrying out linear interpolation on each corresponding element in the r eigenvectors adjacent to the first interpolation position, and determining the eigenvector inserted at the first interpolation position according to the interpolation result.
In some embodiments, the convolutional neural network convolves the feature matrix with at least one convolution kernel, wherein the convolution kernel processes a plurality of feature values for each time dimension in the feature matrix in turn.
In some embodiments, the convolutional neural network is used for key image frame extraction on the video stream, and the convolutional neural network is trained by:
acquiring a plurality of video streams serving as samples, wherein each video stream serving as a sample corresponds to each sample feature matrix of N rows and at least S columns generated by feature extraction on S image frames in the video streams, and a time period label of a marked key frame, the time period label comprises a two-dimensional array for describing a starting time and an ending time of the time period, and the starting time and the ending time are relative times calculated by a first image frame of the video stream;
training the model using the respective sample feature matrices and time period labels such that a prediction loss function corresponding to the plurality of samples is reduced for the model after training compared to before training.
In a further embodiment, each element in the two-dimensional array is a ratio of the corresponding relative time to the total duration of the video stream.
In some embodiments, the convolutional neural network is used to make vehicle processing decisions on the video stream, the convolutional neural network being trained by:
acquiring a plurality of video streams serving as samples, wherein each video stream serving as a sample corresponds to a sample feature matrix of each N rows and at least S columns generated by feature extraction of S image frames in the video streams, and a processing decision label based on an actual vehicle;
the model is trained using respective sample feature matrices, i.e., corresponding processing decision labels, such that a prediction loss function corresponding to the plurality of samples is reduced for the trained model as compared to before training.
In some embodiments, the processing decision tag is a multidimensional vector, and the plurality of elements in the processing decision tag comprise: the probability of renewing each component of the vehicle and the probability of repairing each component of the vehicle.
According to a second aspect, there is provided an apparatus for processing a video stream, the apparatus comprising:
an acquisition unit configured to acquire a video stream to be processed;
the feature extraction unit is configured to respectively perform feature extraction on S image frames in the video stream to generate S N-dimensional feature vectors;
the matrix generation unit is configured to arrange the S N-dimensional feature vectors according to the time sequence of the corresponding image frames to generate a feature matrix, wherein the feature matrix is provided with N rows and at least S columns;
and the convolution processing unit is configured to process the characteristic matrix by utilizing a pre-trained convolution neural network so as to obtain a processing result of the video stream.
According to a third aspect, there is provided a computer readable storage medium having stored thereon a computer program which, when executed in a computer, causes the computer to perform the method of the first aspect.
According to a fourth aspect, there is provided a computing device comprising a memory and a processor, wherein the memory has stored therein executable code, and wherein the processor, when executing the executable code, implements the method of the first aspect.
In the method and the device for processing the video stream provided by the embodiment of the present specification, a plurality of feature extraction models are deployed, feature extraction is performed on each image frame in the video stream respectively to obtain feature vectors of the image frames, then the feature vectors are combined together, a feature matrix with a predetermined size is constructed for the video stream, and the feature matrix is processed by using a pre-trained convolutional neural network model creatively to obtain a processing result of the video stream. In the process, the complexity of model labeling can be reduced, and the relevance between features is mined for time domain video data through the processing of a convolutional neural network, so that more effective video processing is performed.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 illustrates a schematic diagram of an application scenario of an embodiment of the present description;
FIG. 2 shows a flow diagram of a method of processing a video stream according to one embodiment;
FIG. 3 illustrates a feature matrix generation schematic during processing of a video stream according to one embodiment;
FIG. 4 illustrates a schematic diagram of convolving a feature matrix according to a specific example;
fig. 5 shows a schematic block diagram of a processing device of a video stream according to an embodiment.
Detailed Description
The scheme provided by the specification is described below with reference to the accompanying drawings. For convenience of explanation, a specific application scenario of the embodiment of the present specification shown in fig. 1 is described. Fig. 1 shows a specific scenario for identifying vehicle damage.
In this implementation scenario, assuming that the vehicle is damaged, the user may collect the field information of the damaged vehicle through a terminal capable of collecting the field information, such as a smart phone, a camera, a sensor, and the like. The presence information may include a video stream. The video stream may be processed by a computing platform to perform damage identification for the damaged vehicle. As shown in fig. 1, the computing platform in this implementation scenario is comprised of a first computing platform and a second computing platform.
Referring to fig. 1, a first computing platform may first perform feature extraction on S image frames in a video stream through an image frame feature extraction module, and generate an N-dimensional feature vector for each image frame. The S image frame may include each image frame in the video stream, or may be an image frame extracted at a predetermined time interval (e.g., 500 ms). Then, the feature matrix constructing module arranges the N-dimensional feature vectors according to the time sequence of the corresponding image frames to generate a feature matrix. The feature matrix may have N rows and at least S columns. The second computing platform may then process the feature matrix using a pre-trained convolutional neural network to obtain a processing result for the video stream. In the scenario shown in fig. 1, the processing result of the video stream may be a damage identification result for a damaged vehicle. In other application scenarios, the processing result of the video stream may also be a key image frame extraction result, and the like, which is not limited herein.
It is worth noting that the convolutional neural network is a kind of feedforward neural network, and the neurons can respond to the surrounding units, so that large-scale image processing can be performed. The convolutional neural network may include a one-dimensional convolutional neural network, a two-dimensional convolutional neural network, and a three-dimensional convolutional neural network. One-dimensional convolutional neural networks are generally applied to data processing of sequence classes; two-dimensional convolutional neural networks are generally applied to the recognition of image-like texts; three-dimensional convolutional neural networks are commonly applied to medical image and video-class data recognition. For image processing, different features in an image can be explored by training different convolution kernels. It can be seen that the two-dimensional convolutional neural network and the three-dimensional convolutional neural network are both faced with the image itself when used for image or video data processing. If the image is regarded as a matrix formed by a plurality of pixel points, the convolutional neural network can analyze the matrix. Based on this idea, in the technical framework of the present specification, a feature matrix composed of feature vectors of a plurality of image frames is innovatively processed using a convolutional neural network, so that associated features in consecutive images can be discovered.
It is easy to understand that: in one embodiment, the first computing platform and the second computing platform may be the same computing platform, for example, one computing platform integrated in a terminal or a server that provides services for a vehicle damage assessment application running on the terminal; in another embodiment, the first computing platform and the second computing platform may also be two computing platforms that are separately arranged, for example, the first computing platform is arranged at the terminal and is used for preprocessing the acquired video stream to obtain a feature matrix of the video stream, and the second computing platform is arranged at the server and is used for processing the feature matrix through a convolutional neural network to give a damage identification result for the damaged vehicle. It should be noted that the implementation scenario in fig. 1 is exemplary, and in other embodiments, the feature matrix building module may also be disposed in the second computing platform, which is not limited in this specification. In an optional embodiment, the second computing platform may further feed back the damage identification result to the terminal for display.
As can be seen from the foregoing implementation scenarios, the technical solution provided in this specification is to creatively use a convolutional neural network, which is generally used for processing an image, to process a feature matrix composed of feature vectors of a plurality of image frames, and is particularly suitable for an overall decision problem of a video stream, so as to provide a more effective solution for video stream analysis.
The following describes in detail a specific flow of a processing method of a video stream.
Fig. 2 shows a flow diagram of a method of processing a video stream according to one embodiment. The execution subject of the method shown in fig. 2 may be any system, terminal, device, platform or server with certain data processing capability and having computing and processing capability, such as a general computing platform composed of the first computing platform and the second computing platform shown in fig. 1.
As shown in fig. 2, the processing method of the video stream includes the following steps: step 22, obtaining a video stream to be processed; step 24, respectively extracting the features of S image frames in the video stream to generate S feature vectors with N dimensions; step 26, arranging the S N-dimensional feature vectors according to the time sequence of the corresponding image frames to generate a feature matrix, wherein the feature matrix has N rows and at least S columns; and 28, processing the characteristic matrix by using the pre-trained convolutional neural network to obtain a processing result of the video stream.
First, in step 22, a video stream to be processed is acquired. It will be appreciated that a video stream is typically a steady, continuous stream of video data. A video stream may comprise a plurality of image frames. The video stream may be captured by various camera devices, such as a camera, a camera device of a smartphone, and so forth.
In one embodiment, the video stream may be pre-stored on the execution body of the embodiment of the present specification, and at this time, the video stream may be acquired from a local place.
In another embodiment, the video stream may be acquired by the execution subject from a remote device via an off-the-shelf wireless network, for example, the execution subject is a server, and the remote device is a camera or a smart phone with video recording and communication functions.
In yet another embodiment, the video stream may also be captured in the field by executing a capture module (e.g., a camera) integrated on the body, in which case the video stream is not completely captured directly in its entirety, but rather is captured continuously at the capture interval of the image frames.
In further embodiments, the video stream may be acquired in a different manner, which is not limited herein.
After the video stream is obtained, the video stream may be further preprocessed to generate conditions that can be analyzed using a convolutional neural network.
In this way, in step 24, feature extraction is performed on each of the S image frames in the video stream, and S N-dimensional feature vectors are generated.
It will be appreciated that the number of image frames in different video streams may be different. In one implementation, S may be the number of frames of an image frame in the video stream, and feature extraction may be performed on all of the S image frames. In another implementation, where S is a predetermined value, such as 30, S image frames may be extracted at predetermined time intervals, frame intervals, etc. for the acquired video stream and feature extraction may be performed. For example, at predetermined time intervals, one image frame may be decimated every 500 milliseconds. In further implementations, there may be more ways to determine S image frames from the video stream for feature extraction, which are not listed here.
It should be noted that the method for processing a video stream according to the embodiment of the present disclosure is particularly suitable for processing a video stream within a certain time period (e.g., 30 seconds), for example, a live video captured when a damaged vehicle is identified as being damaged.
For an image frame, the extracted features may be predetermined features. These features are typically features related to the analysis requirements for the video stream in a particular scene. For example, in the context of vehicle damage identification, the extracted features may be features describing damaged parts, the degree of damage, and so forth. The process of feature extraction may be determined by a corresponding algorithm and a model trained in advance, or may be detected by a preset parameter threshold (for example, a brightness threshold), which is not limited herein.
For a clearer description, assuming that any image frame in the S image frames is a first image frame, in a possible implementation, the process of extracting features of the first image frame may include: and carrying out target recognition on the first image frame, and determining the target characteristics of the first image frame. It will be appreciated that the processing of the image may be for the purpose of object recognition, for example, in the context of damage recognition of a damaged vehicle, where the object may be, for example, a damaged component, a degree of damage, and so forth. The target feature may include one or more of a damaged part, a damaged material, a damaged category.
Wherein the target recognition may be determined by a pre-trained recognition model. The training sample of the recognition model may include a plurality of pictures pre-labeled with a target label (e.g., bumper scratch, etc.). The recognition model can be trained by sequentially inputting each picture in the training sample into a selected neural network model, such as a Decision Tree (Decision Tree), a Support Vector Machine (SVM), a CNN, and the like, and adjusting model parameters according to a pre-labeled target label.
In another possible implementation, the process of feature extraction on the first image frame may include: based on a comparison of the first image frame with a previous image frame, a change characteristic of the first image frame is determined. The change feature may be used to describe a change between a current image frame and a previous image frame. It can be understood that, in the video stream capturing process, images of a moving object may be captured by a stationary capturing device (e.g., a fixed monitoring camera), images of a stationary object (e.g., a damaged vehicle) may be captured by a moving capturing device (e.g., a smart phone), images of a moving object may be captured by a moving capturing device (e.g., a smart phone), and so on. Therefore, when determining the change characteristics of the image frame, the processing method may also be different for different scenes.
It will be appreciated that when an object is in motion, the intensity pattern of its corresponding point on the image is also in motion. The apparent motion of this image intensity pattern is the optical flow. The optical flow may express a change in the image, and since it contains information about the motion of the object, it may be used to determine the motion of the object. The optical flow definition can also extend the optical flow field to represent a two-dimensional (2D) instantaneous velocity field formed by all pixel points in the image. As such, in one embodiment, optical flow changes from a previous image frame to a first image frame may be characterized as changes to the first image frame. The Optical Flow variation may be realized by a method such as an Optical Flow (Optical Flow) model. Optical flow models come in a variety of forms, for example, two pictures (e.g., a first image frame and a previous image frame) can be input together into a "linear" CNN, with the optical flow output resulting in an offset per pixel. In an alternative implementation, a position point (e.g., the upper left corner of the front left headlight) included in both the two image frames may also be selected as a reference point, where the reference point corresponds to a first coordinate in the first image frame and a second coordinate in the previous image frame in the two image frames, respectively, and then the offset coordinates of the first coordinate and the second coordinate may be determined as the variation feature of the first image frame. For example, the two-dimensional coordinate systems are both based on the central point of the image and the horizontal axis along the length direction, and the first coordinate and the second coordinate correspond to two-dimensional coordinates in the coordinate systems.
On the other hand, in a video stream, the moving speed of the capturing device tends to lag behind the image frame capturing speed, and therefore, two adjacent image frames may contain the same feature point. The characteristic points of the image are points which have clear characteristics in the image, can effectively reflect the essential characteristics of the image and can identify a target object in the image. The feature points may be determined by a method such as Scale-invariant feature transform (SIFT), Local Binary Pattern (LBP), and the like, and will not be described herein again. Thus, in one embodiment, the change of two adjacent images can be evaluated according to the shift of the feature point. The shift of the feature point can be described by a projection matrix (projected matrix). For example, assuming that the feature point set of the first image frame is Y and the feature point set of the previous image frame is X, a transformation matrix w may be solved, so that the result of f (X) Xw is as close to Y as possible, and the solved transformation matrix w may be used as the projection matrix from the previous image frame to the first image frame. Further, the offset matrix may be used as a change characteristic of the first image frame.
In another embodiment, the changing characteristic of the first image frame may also be determined by image Similarity (feature Similarity) of the first image frame and a previous image frame. Image similarity can be measured by the ssim (structural similarity index measure) index. That is, the SSIM index of the first image frame and the previous image frame may be taken as a change characteristic of the first image frame. As an example, where Y denotes a first image frame, X denotes a previous image frame, and SSIM indices of X and Y are calculated as follows:
Figure BDA0001969782140000101
wherein, UXIs the average gray value, U, of each pixel point of XYIs the mean gray value of Y, Ux and UYLuminance estimates for X and Y, respectively;
Figure BDA0001969782140000102
for the variance in X determined by the gray value of each pixel,
Figure BDA0001969782140000103
is the variance in Y determined by the gray value of each pixel,
Figure BDA0001969782140000104
and
Figure BDA0001969782140000105
as contrast estimates for X and Y, respectively; piXYThe covariance of the gray value of each pixel point in X and Y; c1 and C2 are constants for stabilizing the division operation. The maximum value of the SSIM index is 1, the larger the SSIM index is, the higher the structural similarity of the two images is, and when the SSIM index is 1, the structures of the two images are consistent.
In further embodiments, there are further ways to determine the variation characteristics of the first image frame, which are not described herein again. It should be noted that the above variation features can be used alone or in combination in related embodiments, and are not limited herein.
In the case where the first image frame is the first image frame of the video stream, when determining the change characteristic, the first image frame itself may be compared as the previous image frame, or the change characteristic may be directly determined as a predetermined value, for example, each element of the projection matrix is 1, or the optical flow output is 0, or the like.
In yet another possible embodiment, those skilled in the art will appreciate that the features extracted from the first image frame may also include other features, such as one or more of sharpness features, illumination features, object presence features (whether an object is included), shooting angle features (e.g., whether a video is taken or not), and so on, depending on the application scenario. These features can be stitched in the manner described above for inclusion in a predetermined N-dimensional feature vector.
In one possible design, a variation feature such as a target feature may be fused. At this time, for the first image frame, a variation characteristic (such as a projection matrix) thereof may be determined first, and in the case that the first image frame and the previous image frame contain the same target, a target characteristic of the previous image frame may be mapped to the first image frame, so that it is not necessary to acquire the target characteristic of the first image frame through target recognition, for example, add a bumper scratch feature of the previous image frame in the first image frame, and so on.
In the case where only one feature is extracted for each of the S image frames of the video stream, the feature may be generated as a feature vector corresponding to the image frame. At this time, the dimension of the feature may be N-dimension.
On the other hand, if a plurality of features are extracted from S image frames of the video stream, feature values of the plurality of features may be combined and spliced to generate an N-dimensional feature vector.
Wherein N may be a predetermined positive integer, and each dimension in the feature vector is a feature value representing a predetermined feature.
If a certain feature (e.g., the aforementioned variation feature) of each image frame includes a matrix (e.g., the projection matrix described above), since the feature vector of the first image frame is an N-dimensional feature vector, the matrix may be further expanded or spliced, for example, columns of the projection matrix are spliced and arranged to obtain a k-dimensional column vector as a part of the N-dimensional feature vector, where N ≧ k.
In this way, S N-dimensional feature vectors may be obtained for S image frames in the video stream. Further, in step 26, the S N-dimensional feature vectors are arranged in the time order of the corresponding image frames to generate a feature matrix. Wherein the feature matrix has N rows and at least S columns.
It will be appreciated that the size of the feature matrix processed by the pre-trained neural network is often predetermined. If the S image frames in the video stream are extracted according to the predetermined frame number S, that is, the preset column number of the feature matrix is S column, the S N-dimensional feature vectors can be directly combined and arranged to generate a matrix of N-dimensional S column as the feature matrix of the video stream. However, since the video length may not be known in advance, the value of S cannot be determined in advance, if the preset number of columns of the feature matrix is M columns, S N-dimensional feature vectors may still be directly combined to form the feature matrix if S is equal to M, and a simple feature vector combination cannot generate a feature matrix of a predetermined size if S < M.
Thus, in one possible design, M-S eigenvectors may be supplemented with S N-dimensional eigenvectors by interpolation to generate an N-row and M-column eigenvector matrix. It will be appreciated that when M-S feature vectors are supplemented, two problems are involved, the first being the location of the supplemented feature vectors and the other being what feature vectors are supplemented.
For the first problem, in an alternative implementation, the locations of the supplementary feature vectors are evenly distributed, e.g., how many feature vectors supplement one feature vector per interval is determined by (M-S)/S. As shown in FIG. 3, C can be inserted into an N-dimensional feature vector, assuming that there are no 2 feature vectors inserted in between0、C1、C2、C3The position pointed by the equal corresponding arrow is the position of the supplementary feature vector. It should be noted that the positions of the supplementary feature vectors in fig. 3 are merely examples, and X may be used in specific implementations11Then, or X21The latter position is taken as the position of the first supplementary feature vector (corresponding to C)0)。
For the second problem, the specific values of the dimensions of the supplementary feature vectors are determined. For convenience of description, the location of any determined supplemental feature vector is referred to as the first interpolated location, e.g., C0、C1、C2、C3Etc. correspond to the positions indicated by the arrows. In an alternative implementation, the feature vector nearest to the first interpolation position may be taken as the feature vector inserted at the first interpolation position. For example, at C0Insert feature vector [ X ] corresponding to the position pointed by the arrow11、X12……X1N]. In the case that the first interpolation position includes two nearest neighboring feature vectors, one of the feature vectors may be randomly selected to be inserted into the first interpolation position, or a corresponding feature vector may be selected to be inserted into the first interpolation position according to a predetermined selection rule (for example, the selection of the next feature vector), which is not limited herein. In another alternative implementation manner, it is also possible to perform linear interpolation on each corresponding element in r eigenvectors adjacent to the first interpolation position, and determine the eigenvector inserted at the first interpolation position according to the interpolation result. Where r may be a predetermined value, such as 4. Please refer to fig. 3, with C1Taking the position pointed by the corresponding arrow as an example, X11、X21、X31、X41Respectively regarding the points as points in a two-dimensional coordinate system with time as a horizontal axis and characteristic values as a vertical axis, and performing linear interpolation operation to obtain C1The value of the first dimension (ordinate) of the inserted N-dimensional feature vector corresponding to the position (abscissa is known). By analogy, C can be obtained1The value of each dimension of the N-dimensional feature vector inserted at the corresponding position.
In addition to the above interpolation method, in other possible designs, M-S feature vectors identical to the N-dimensional feature vector of the last frame may be added to the back of the last frame to form M N-dimensional feature vectors, so as to combine into a feature matrix with N rows and M columns, which is not listed here.
A feature matrix that can be processed through a pre-trained convolutional neural network can be generated for a video stream at a predetermined size, via step 26. The feature matrix is then processed using a pre-trained convolutional neural network to obtain a processing result for the video stream in step 28.
It will be appreciated that when a convolutional neural network processes an image, its input matrix is often in the format of "batch size (batch _ size) × length × width channel number". The channels of the color image are usually "R", "G" and "B" 3 channels, i.e. the number of channels is 3. Obviously, in this format, the length and width are independent of each other, and the channels are mutually affected. Similarly, in the two-dimensional convolution operation on the feature matrix, the features of different spatial positions of the image should be independent, and the two-dimensional convolution operation has spatial invariance. Since the convolution is usually performed in the dimension of "length/width" during the image processing, if "length/width" is replaced by the number of rows and columns in the feature matrix, the features at different positions will affect each other in the feature dimension, rather than being independent of each other, and it is not reasonable to perform the convolution. For example, extracting a detail damage map requires features of multiple dimensions, such as detail map classification and damage detection results, to be simultaneously involved. That is, the spatial invariance holds in the time dimension, and does not hold in the feature dimension. Thus, the feature dimensions here may correspond to the properties of the channel dimensions in the image processing. Thus, the input format of the feature matrix may be adjusted, for example, to "batch size (batch _ size) × 1 × column count (e.g., S or M) × row count (N)". Thus, convolution can be performed in the dimension of "1 x column number (e.g., M)", each column is a feature set at a time, and by performing convolution on the time dimension, the association between features can be mined.
In one embodiment, a convolutional neural network may include one or more convolutional processing layers and an output layer. The convolution processing layer may be composed of a two-dimensional convolution layer, an active layer, and a Normalization layer, such as 2D convolution Filter + ReLU + Batch Normalization.
Wherein the two-dimensional convolutional layer may be used to convolve the feature matrix with a convolutional core corresponding to the time dimension. As shown in fig. 4, the N × M feature matrix is an M × N matrix obtained by the above format conversion, and may be subjected to convolution operation corresponding to the time dimension through a convolution kernel such as (1, -1, -1, 1). In the training process of the convolutional neural network, a convolution kernel can be trained on purpose. For example, one convolution kernel may be trained for each feature. The convolution kernels (1, -1, -1,1) shown in fig. 4, for example, are convolution kernels corresponding to the characteristics of component damage in the vehicle damage detection scene, and so on. Thus, through the convolution operation of each convolution kernel, a feature (e.g., a component damage feature in a vehicle damage detection scenario) can be identified.
The active layer may be used to non-linearly map the output of the two-dimensional convolutional layer. The activation layer may be implemented by an excitation function such as Sigmoid, Tanh (hyperbolic tangent), ReLU, or the like. The output result of the two-dimensional convolutional layer is mapped to a non-linear variation value between 0 and 1 through the active layer.
As the network deepens, the output result after passing through the active layer may move to a gradient saturation region (corresponding to a region with small change of the excitation function gradient). Thus, the convolutional neural network may converge slowly or not due to the gradient reduction or disappearance. Therefore, the output result of the active layer can be further pulled back to the region where the gradient change of the excitation function is significant through the Normalization layer (Batch Normalization).
The output layer is used for outputting the processing result of the video stream. The processing result output by the output layer is different according to the scene and purpose of video stream processing.
For example, in an application scenario of the key frame extraction, the extracted key frame may be an image frame having a relatively large significance to the result, for example, an image frame containing a damage in a video stream of the vehicle damage identification. The key frames may also be extracted in segments if the vehicle damage is discontinuous. At this time, the processing result output by the output layer may be, for example, [ t [ [ t ]1,t2]Such a two-dimensional array representing a time range. Wherein, t1Indicating a key frame start time, t2Indicating a key frame end time. In some alternative implementations, t1、t2But also normalized values. For example, the total number of image frames is 30 frames, and the 18 th to 25 th frames can be represented as [18/30, 25/30 ]]. Through normalization, the output gradient explosion can be avoided, or the output result is not converged.
In this case, in the process of training the convolutional neural network, a plurality of video streams as samples may be acquired first. Wherein the video streams are pre-processed in steps 22-26 to obtain a sample feature matrix. Each sample feature matrix is a matrix of N rows and at least S columns. Each video stream may also have a time period label where the key frame is pre-labeled. The model may then be trained using the respective sample feature matrices and the time period labels. The time zone label here is, for example, the aforementioned [ t ]1,t2]Such a two-dimensional array is used to describe the start time and the end time of the time period. The start time and the end time may be relative time counted from the beginning of the first image frame of the video stream, and the relative time may be relative description such as 5 th second and 5 th frames. Optionally, each element in the two-dimensional array is a ratio of the corresponding relative time to the total duration of the video stream. Accordingly, the total duration of the video may be described by 30 seconds and 60 frames, which is not limited herein.
As known to those skilled in the art, the parameters of the model may be adjusted by, for example, a gradient descent method based on the respective sample feature matrix and the time period label corresponding to each sample. The loss function in the model-trained thread is, for example, a sum of squares of differences between the prediction function and the tag value of each of the plurality of samples, or a sum of absolute values of differences between the prediction function and the tag value of each of the plurality of samples, or the like. The following description will be given by taking an example in which the loss function is calculated by MSE (Minimum Squared Error).
The output value of substituting the sample feature matrix of the first sample (kth sample) into the model is [ yk1,yk2]The time period label corresponding to the sample feature matrix is [ yk10,yk20]Substitution model loss function L1:
Figure BDA0001969782140000151
it can be seen that the prediction function of the next-ranked sample is also related to the prediction function result of the previous-ranked sample. Then, the model parameters are graded in the loss function, and the values of the parameters are adjusted in the opposite direction of the gradient, so that the value of the loss function of the trained model is reduced.
In some embodiments, if the final extracted key frame is 1 image frame, the post-processing may be further performed on the processing result of the video stream of the time range of the key frame output by the convolutional neural network. For example, the first image frame with the detected definition meeting the requirement is extracted according to a preset priority extraction rule. The predetermined preferential extraction rule is performed, for example, from the middle frame to both sides simultaneously.
As another example, in an application scenario where a damaged component and a processing strategy (e.g., replacement, repair) are determined through a video stream captured for a damaged vehicle, the processing result output by the convolutional neural network may be, for example, a multi-dimensional array composed of predetermined processing decisions for each component.
In this case, the convolution kernel of each convolution processing layer of the convolutional neural network can identify one of the features. In this case, the training samples of the convolutional neural network may be a plurality of video streams. These video streams are pre-processed in steps 22-26 to obtain a sample feature matrix. Each sample feature matrix is a matrix of N rows and at least S columns. Each video stream may also have pre-labeled processing decision labels. These processing decision tags may be determined based on processing results for the actual vehicle and may include, for example, at least one of a renewal, a repair, and the like. It is understood that for a damaged vehicle, the damaged component may include a plurality of damaged components, and the processing decision may also be various (such as updating, repairing, etc.), and therefore, the processing decision tag may be a multidimensional array, and each element value in the array corresponds to the processing decision of the relevant component. The model may then be trained with the respective sample feature matrices and the processing decision labels.
As known to those skilled in the art, the parameters of the model may be adjusted by, for example, a gradient descent method based on the respective sample feature matrix and the processing decision label corresponding to the respective sample. The model has trained loss functions in the threads, such as sigmiod functions, mean square error, etc. The following description will be given taking an example of calculating the loss function by means of a sigmiod function.
Substituting the sample feature matrix of the first sample into the model to output a vector Y with r dimension1And the damage identification result label corresponding to the sample characteristic matrix is Y0Is a reaction of Y1Performing a smoothing operation to obtain:
Hk=1/(1+exp(-Y1))
substitution model loss function L2:
L2=-∑k(Y0*log(Hk)+(I-Y0)*log(I-Hk))/r
wherein I is a unit vector. "+" indicates inner product of vectors. It can be seen that the prediction function of the next-ranked sample is also related to the prediction function result of the previous-ranked sample. Then, the model parameters are graded in the loss function, and the values of the parameters are adjusted in the opposite direction of the gradient, so that the value of the loss function of the trained model is reduced.
In some embodiments, the output result of the convolutional neural network may be a corresponding probability, for example, a probability of repairing or replacing the front bumper, and a final decision result may be output by comparing the probability with a corresponding threshold. The corresponding threshold value can be predicted by a sample set different from the training set through a trained convolutional neural network, and is determined by combining the prediction accuracy requirement.
In more application scenarios, the convolutional neural network may also have an output result corresponding to the scenario, which is not illustrated here.
Reviewing the above process, in the process of processing the video stream, the feature vectors of each image frame are combined to generate the feature matrix which can be processed by the convolutional neural network by collecting the time domain signal and preprocessing the extracted features and the like of each image frame in the video stream, so that each image frame in the video stream can be comprehensively analyzed by the convolutional neural network, and different designs of the output layer of the convolutional neural network can be applied to different video processing problems, so that the video stream is processed more effectively.
According to an embodiment of another aspect, a processing device of a video stream is also provided. Fig. 5 shows a schematic block diagram of a processing device of a video stream according to an embodiment. As shown in fig. 5, the apparatus 500 for processing a video stream includes: an acquisition unit 51 configured to acquire a video stream to be processed; a feature extraction unit 52 configured to perform feature extraction on S image frames in the video stream, respectively, and generate S N-dimensional feature vectors; a matrix generating unit 53 configured to arrange the N-dimensional feature vectors in a time sequence of the corresponding image frames to generate a feature matrix, wherein the feature matrix has N rows and at least S columns; and a convolution processing unit 54 configured to process the feature matrix by using a pre-trained convolution neural network to obtain a processing result of the video stream.
For convenience of description, it is assumed that any one of the S image frames is the first image frame.
According to one embodiment, the feature extraction unit 52 is further configured to: determining a change characteristic of the first image frame based on a comparison with a previous image frame of the first image frame.
In one embodiment, the feature extraction unit 52 may use optical flow change from the previous image frame to the first image frame as the change feature.
In another embodiment, the feature extraction unit 52 may determine the SSIM index of the first image frame determined by the structural similarity model and the previous image frame as the variation feature of the first image frame.
In yet another embodiment, the feature extraction unit 52 may: and determining a projection matrix of the previous image frame transformed to the first image frame based on the transformation relation between the first image frame and the previous image frame, and taking the projection matrix as a change characteristic.
It should be noted that, in the case that the first image frame is the first image frame of the video stream, the feature extraction unit 52 may: determining that the change characteristic comprises a predetermined value, or determining that the previous image frame and the first image frame are the same image frame.
According to another embodiment, the feature extraction unit 52 may be further configured to:
and performing target recognition on a first image frame in the S image frames, and determining the target characteristics of the first image frame. When the video stream is a video stream shot for a damaged vehicle, the target feature may include one or more of a damaged component, a damaged material, and a damaged category.
According to other embodiments, the feature extraction unit 52 may be further configured to:
and detecting one or more items of blurring, containing a target, enough illumination and preset shooting angle for a first image frame in the S image frames, and taking the detection result as the corresponding characteristic of the first image frame.
Further, the matrix generating unit 53 may combine feature values corresponding to respective features extracted by the feature extracting unit 52 for respective image frames, thereby generating an N-dimensional feature vector.
In one possible design, the matrix generation unit 53 may also: and supplementing M-S eigenvectors in the S N-dimensional eigenvectors by utilizing an interpolation mode to generate an eigenvector matrix with N rows and M columns.
Wherein, for the first interpolation position, the interpolation mode comprises one of the following modes:
taking the feature vector nearest to the first interpolation position as the feature vector inserted at the first interpolation position;
and respectively carrying out linear interpolation on each corresponding element in the r eigenvectors adjacent to the first interpolation position, and determining the eigenvector inserted at the first interpolation position according to the interpolation result.
In one embodiment, the convolutional neural network convolves the feature matrix with at least one convolution kernel. The convolution kernel processes a plurality of eigenvalues for each time dimension in the eigenvalue matrix in turn.
In the case where the convolutional neural network is used for key image frame extraction of a video stream, the apparatus 500 may further include a first model training unit configured to train the convolutional neural network by:
acquiring a plurality of video streams serving as samples, wherein each video stream serving as a sample corresponds to a sample feature matrix of each N rows and at least S columns generated by feature extraction on S image frames in the video streams, and a time period label of a marked key frame;
the model is trained using the respective sample feature matrices and the time period labels such that a loss function corresponding to the sample is reduced for the trained model as compared to before the training.
In the case where the convolutional neural network is used to make vehicle processing decisions on the video stream, the apparatus 500 may further include a second model training unit configured to train the convolutional neural network by:
acquiring a plurality of video streams serving as samples, wherein each video stream serving as a sample corresponds to a sample feature matrix of each N rows and at least S columns generated by feature extraction of S image frames in the video streams, and a processing decision label based on an actual vehicle;
the model is trained using the respective sample feature matrices, i.e., the corresponding processing decision labels, such that the loss function corresponding to the sample is reduced for the trained model as compared to before the training.
Optionally, the processing decision tag is a multidimensional vector, and the plurality of elements in the processing decision tag may include: the probability of renewing each component of the vehicle and the probability of repairing each component of the vehicle.
It should be noted that the apparatus 500 shown in fig. 5 is an apparatus embodiment corresponding to the method embodiment shown in fig. 2, and the corresponding description in the method embodiment shown in fig. 2 is also applicable to the apparatus 500, and is not repeated herein.
According to an embodiment of another aspect, there is also provided a computer-readable storage medium having stored thereon a computer program which, when executed in a computer, causes the computer to perform the method described in connection with fig. 2.
According to an embodiment of yet another aspect, there is also provided a computing device comprising a memory and a processor, the memory having stored therein executable code, the processor, when executing the executable code, implementing the method described in connection with fig. 2.
Those skilled in the art will recognize that, in one or more of the examples described above, the functions described in this invention may be implemented in hardware, software, firmware, or any combination thereof. When implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium.
The above-mentioned embodiments, objects, technical solutions and advantages of the present invention are further described in detail, it should be understood that the above-mentioned embodiments are only exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made on the basis of the technical solutions of the present invention should be included in the scope of the present invention.

Claims (36)

1. A method of processing a video stream, the method comprising:
acquiring a video stream to be processed;
respectively extracting features of S image frames in the video stream to generate S N-dimensional feature vectors, wherein the S image frames are all image frames in the video stream or image frames extracted according to a preset time interval or a frame interval;
generating a feature matrix based on the arrangement of the S N-dimensional feature vectors according to the time sequence of the corresponding image frames, wherein the feature matrix has N rows and M columns, and M is larger than or equal to S;
and processing the characteristic matrix by utilizing a pre-trained convolutional neural network to obtain a processing result of the video stream.
2. The method of claim 1, wherein the S image frames comprise a first image frame, and wherein the separately feature extracting the S image frames in the video stream comprises:
determining a change characteristic of the first image frame based on a comparison with a previous image frame of the first image frame.
3. The method of claim 2, wherein the S image frames comprise a first image frame, the separately feature extracting S image frames in the video stream further comprising: taking optical flow changes from the previous image frame to the first image frame as the change feature.
4. The method of claim 2, wherein the S image frames comprise a first image frame, the separately feature extracting S image frames in the video stream further comprising:
determining SSIM indexes of the first image frame and the previous image frame determined by a structural similarity model as the change characteristics of the first image frame.
5. The method of claim 2, wherein the S image frames comprise a first image frame, the separately feature extracting S image frames in the video stream further comprising:
determining a projection matrix of the previous image frame to the first image frame;
and taking the projection matrix as the change characteristic.
6. The method according to any of claims 2-5, wherein in case the first image frame is the first image frame of the video stream, it is determined that the change characteristic comprises a predetermined value or that the previous image frame and the first image frame are the same image frame.
7. The method of claim 1, wherein the separately feature extracting S image frames in the video stream comprises:
and performing target recognition on a first image frame in the S image frames, and determining a target feature of the first image frame.
8. The method of claim 7, wherein the video stream is a video stream captured for a damaged vehicle, and the target features include one or more of damaged parts, damaged material, damaged category.
9. The method of claim 1, wherein the separately feature extracting S image frames in the video stream comprises:
and detecting one or more items of blurring, containing a target, enough illumination and preset shooting angle for a first image frame in the S image frames, and taking the detection result as the corresponding characteristic of the first image frame.
10. The method of claim 1, wherein, in the case of decimating a plurality of features for a first image frame of the S image frames, the generating S N-dimensional feature vectors comprises:
and combining the characteristic values corresponding to a plurality of characteristics of the first image frame to generate an N-dimensional characteristic vector.
11. The method of claim 1, wherein generating a feature matrix based on the arrangement of the S N-dimensional feature vectors in the temporal order of the corresponding image frames comprises:
and supplementing M-S eigenvectors in the S N-dimensional eigenvectors by utilizing an interpolation mode to generate the eigenvector matrix with N rows and M columns.
12. The method of claim 11, wherein for a first interpolated position, the interpolation mode comprises one of:
taking the feature vector nearest to the first interpolation position as the feature vector inserted at the first interpolation position;
and respectively carrying out linear interpolation on each corresponding element in the r eigenvectors adjacent to the first interpolation position, and determining the eigenvector inserted at the first interpolation position according to the interpolation result.
13. The method of claim 1, wherein the convolutional neural network convolves the feature matrix with at least one convolution kernel, wherein the convolution kernel processes a plurality of eigenvalues for each time dimension in the feature matrix in turn.
14. The method of claim 13, wherein the convolutional neural network is used for key image frame decimation on the video stream, the convolutional neural network being trained by:
acquiring a plurality of video streams serving as samples, wherein each video stream serving as a sample corresponds to a sample feature matrix of each N rows and M columns generated by feature extraction on S image frames in the video streams, and a time period label of a marked key frame, wherein the time period label comprises a two-dimensional array for describing a starting time and an ending time of the time period, and the starting time and the ending time are relative times calculated by a first image frame of the video stream;
training the convolutional neural network using the respective sample feature matrices and time segment labels such that a prediction loss function corresponding to the samples of the convolutional neural network after training is reduced compared to before training.
15. The method of claim 14, wherein each element in the two-dimensional array is a ratio of a corresponding relative time to a total duration of the video stream.
16. The method of claim 13, wherein the convolutional neural network is used to make vehicle processing decisions on the video stream, the convolutional neural network being trained by:
acquiring a plurality of video streams serving as samples, wherein each video stream serving as a sample corresponds to a sample feature matrix of each N rows and M columns generated by feature extraction on S image frames in the video streams, and a processing decision label based on an actual vehicle;
training the convolutional neural network using each sample feature matrix and corresponding processing decision labels such that a prediction loss function corresponding to the sample of the convolutional neural network after training is reduced compared to before training.
17. The method of claim 16, wherein the processing decision tag is a multi-dimensional vector, a plurality of elements in the processing decision tag comprising: the probability of renewing each component of the vehicle and the probability of repairing each component of the vehicle.
18. An apparatus for processing a video stream, the apparatus comprising:
an acquisition unit configured to acquire a video stream to be processed;
a feature extraction unit configured to perform feature extraction on S image frames in the video stream respectively to generate S N-dimensional feature vectors, where the S image frames are all image frames in the video stream or image frames extracted at predetermined time intervals or frame intervals;
the matrix generation unit is configured to generate a feature matrix based on the arrangement of the S N-dimensional feature vectors according to the time sequence of the corresponding image frames, wherein the feature matrix has N rows and M columns, and M is larger than or equal to S;
and the convolution processing unit is configured to process the characteristic matrix by utilizing a pre-trained convolution neural network so as to obtain a processing result of the video stream.
19. The apparatus of claim 18, wherein the S image frames comprise a first image frame, the feature extraction unit further configured to:
determining a change characteristic of the first image frame based on a comparison with a previous image frame of the first image frame.
20. The apparatus of claim 19, wherein the feature extraction unit is further configured to: taking optical flow changes from the previous image frame to the first image frame as the change feature.
21. The apparatus of claim 19, wherein the feature extraction unit is further configured to:
determining SSIM indexes of the first image frame and the previous image frame determined by a structural similarity model as the change characteristics of the first image frame.
22. The apparatus of claim 19, wherein the feature extraction unit is further configured to:
determining a projection matrix of the previous image frame to the first image frame;
and taking the projection matrix as the change characteristic.
23. The apparatus according to any of claims 19-22, wherein in case the first image frame is the first image frame of the video stream, the feature extraction unit is further configured to: determining that the change characteristic comprises a predetermined value, or determining that the previous image frame and the first image frame are the same image frame.
24. The apparatus of claim 18, wherein the feature extraction unit is further configured to:
and performing target recognition on a first image frame in the S image frames, and determining a target feature of the first image frame.
25. The apparatus of claim 24, wherein the video stream is a video stream captured for a damaged vehicle, and the target features include one or more of damaged parts, damaged materials, damaged categories.
26. The apparatus of claim 18, wherein the feature extraction unit is further configured to:
and detecting one or more items of blurring, containing a target, enough illumination and preset shooting angle for a first image frame in the S image frames, and taking the detection result as the corresponding characteristic of the first image frame.
27. The apparatus of claim 18, wherein in the case of decimating a plurality of features for a first image frame of the S image frames, the generating S N-dimensional feature vectors comprises:
and combining the characteristic values corresponding to a plurality of characteristics of the first image frame to generate an N-dimensional characteristic vector.
28. The apparatus of claim 18, wherein the matrix generation unit is further configured to:
and supplementing M-S eigenvectors in the S N-dimensional eigenvectors by utilizing an interpolation mode to generate the eigenvector matrix with N rows and M columns.
29. The apparatus of claim 28, wherein for a first interpolated position, the interpolation mode comprises one of:
taking the feature vector nearest to the first interpolation position as the feature vector inserted at the first interpolation position;
and respectively carrying out linear interpolation on each corresponding element in the r eigenvectors adjacent to the first interpolation position, and determining the eigenvector inserted at the first interpolation position according to the interpolation result.
30. The apparatus of claim 18, wherein the convolutional neural network convolves the feature matrix with at least one convolution kernel, wherein the convolution kernel processes a plurality of eigenvalues for each time dimension in the feature matrix in turn.
31. The apparatus of claim 30, wherein the convolutional neural network is for key image frame decimation on the video stream, the apparatus further comprising a first model training unit configured to train the convolutional neural network by:
acquiring a plurality of video streams serving as samples, wherein each video stream serving as a sample corresponds to a sample feature matrix of each N rows and M columns generated by feature extraction on S image frames in the video streams, and a time period label of a marked key frame, wherein the time period label comprises a two-dimensional array for describing a starting time and an ending time of the time period, and the starting time and the ending time are relative times calculated by a first image frame of the video stream;
training the model using the respective sample feature matrices and time period labels such that a prediction loss function corresponding to the plurality of samples is reduced for the model after training compared to before training.
32. The apparatus of claim 31, wherein each element in the two-dimensional array is a ratio of a corresponding relative time to a total duration of the video stream.
33. The apparatus of claim 30, wherein the convolutional neural network is used to make vehicle processing decisions on the video stream, the apparatus further comprising a second model training unit configured to train the convolutional neural network by:
acquiring a plurality of video streams serving as samples, wherein each video stream serving as a sample corresponds to a sample feature matrix of each N rows and M columns generated by feature extraction on S image frames in the video streams, and a processing decision label based on an actual vehicle;
the model is trained using respective sample feature matrices, i.e., corresponding processing decision labels, such that a prediction loss function corresponding to the plurality of samples is reduced for the trained model as compared to before training.
34. The apparatus of claim 33, wherein the processing decision tag is a multi-dimensional vector, a plurality of elements in the processing decision tag comprising: the probability of renewing each component of the vehicle and the probability of repairing each component of the vehicle.
35. A computer-readable storage medium, having stored thereon a computer program which, when executed in a computer, causes the computer to perform the method of any of claims 1-17.
36. A computing device comprising a memory and a processor, wherein the memory has stored therein executable code that, when executed by the processor, performs the method of any of claims 1-17.
CN201910114910.5A 2019-02-14 2019-02-14 Video stream processing method and device Active CN110569702B (en)

Priority Applications (6)

Application Number Priority Date Filing Date Title
CN201910114910.5A CN110569702B (en) 2019-02-14 2019-02-14 Video stream processing method and device
TW108129775A TWI750498B (en) 2019-02-14 2019-08-21 Method and device for processing video stream
US16/703,088 US10943126B2 (en) 2019-02-14 2019-12-04 Method and apparatus for processing video stream
EP20709433.5A EP3857440A1 (en) 2019-02-14 2020-02-06 Method and apparatus for processing video stream
SG11202104426WA SG11202104426WA (en) 2019-02-14 2020-02-06 Method and apparatus for processing video stream
PCT/US2020/017007 WO2020167581A1 (en) 2019-02-14 2020-02-06 Method and apparatus for processing video stream

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910114910.5A CN110569702B (en) 2019-02-14 2019-02-14 Video stream processing method and device

Publications (2)

Publication Number Publication Date
CN110569702A CN110569702A (en) 2019-12-13
CN110569702B true CN110569702B (en) 2021-05-14

Family

ID=68772822

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910114910.5A Active CN110569702B (en) 2019-02-14 2019-02-14 Video stream processing method and device

Country Status (6)

Country Link
US (1) US10943126B2 (en)
EP (1) EP3857440A1 (en)
CN (1) CN110569702B (en)
SG (1) SG11202104426WA (en)
TW (1) TWI750498B (en)
WO (1) WO2020167581A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113486173B (en) * 2021-06-11 2023-09-12 南京邮电大学 Text labeling neural network model and labeling method thereof

Families Citing this family (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11756301B2 (en) * 2020-04-20 2023-09-12 Prime Focus Technologies Limited System and method for automatically detecting and marking logical scenes in media content
CN111652165B (en) * 2020-06-08 2022-05-17 北京世纪好未来教育科技有限公司 Mouth shape evaluating method, mouth shape evaluating equipment and computer storage medium
US11341682B2 (en) * 2020-08-13 2022-05-24 Argo AI, LLC Testing and validation of a camera under electromagnetic interference
CN111737522B (en) * 2020-08-14 2021-03-02 支付宝(杭州)信息技术有限公司 Video matching method, and block chain-based infringement evidence-saving method and device
CN112348011B (en) * 2020-09-10 2022-08-09 小灵狗出行科技有限公司 Vehicle damage assessment method and device and storage medium
CN112100075B (en) * 2020-09-24 2024-03-15 腾讯科技(深圳)有限公司 User interface playback method, device, equipment and storage medium
US11538247B2 (en) * 2020-09-29 2022-12-27 Wipro Limited Method and system for manufacturing operations workflow monitoring using structural similarity index based activity detection
CN112395971A (en) * 2020-11-16 2021-02-23 公安部第三研究所 StarGAN-based face test image generation method under different quantitative illumination and angle conditions, application and storage medium
CN112560751A (en) * 2020-12-24 2021-03-26 湘潭大学 Balcony high-altitude falling risk detection method and system
CN113076813B (en) * 2021-03-12 2024-04-12 首都医科大学宣武医院 Training method and device for mask face feature recognition model
US20220374625A1 (en) * 2021-05-07 2022-11-24 Google Llc Machine-Learned Models for Unsupervised Image Transformation and Retrieval
CN113297949B (en) * 2021-05-20 2024-02-20 科大讯飞股份有限公司 High-altitude parabolic detection method and device, computer equipment and storage medium
CN113327628B (en) * 2021-05-27 2023-12-22 抖音视界有限公司 Audio processing method, device, readable medium and electronic equipment
CN113486763A (en) * 2021-06-30 2021-10-08 上海商汤临港智能科技有限公司 Method, device, equipment and medium for identifying personnel conflict behaviors in vehicle cabin
CN113960152B (en) * 2021-10-18 2023-06-06 北方工业大学 Trace explosive identification method and system based on ion mobility spectrometry
CN114283060A (en) * 2021-12-20 2022-04-05 北京字节跳动网络技术有限公司 Video generation method, device, equipment and storage medium
WO2023116351A1 (en) * 2021-12-21 2023-06-29 上海微创卜算子医疗科技有限公司 Responsibility frame extraction method, video classification method, device and medium
CN114390200B (en) * 2022-01-12 2023-04-14 平安科技(深圳)有限公司 Camera cheating identification method, device, equipment and storage medium
CN114049771A (en) * 2022-01-12 2022-02-15 华砺智行(武汉)科技有限公司 Bimodal-based traffic anomaly detection method and system and storage medium
CN114871486B (en) * 2022-06-21 2023-05-05 大畏机床(江苏)有限公司 Planer and processing control method thereof

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104036243A (en) * 2014-06-06 2014-09-10 电子科技大学 Behavior recognition method based on light stream information
CN106980823A (en) * 2017-03-14 2017-07-25 天津大学 A kind of action identification method based on interframe self similarity
CN107194323A (en) * 2017-04-28 2017-09-22 阿里巴巴集团控股有限公司 Car damage identification image acquiring method, device, server and terminal device
CN108960207A (en) * 2018-08-08 2018-12-07 广东工业大学 A kind of method of image recognition, system and associated component

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AU2003280516A1 (en) * 2002-07-01 2004-01-19 The Regents Of The University Of California Digital processing of video images
US9436876B1 (en) * 2014-12-19 2016-09-06 Amazon Technologies, Inc. Video segmentation techniques
US10025988B2 (en) * 2015-05-22 2018-07-17 Tektronix, Inc. Anomalous pixel detection
US9697833B2 (en) * 2015-08-25 2017-07-04 Nuance Communications, Inc. Audio-visual speech recognition with scattering operators
EP3405908B1 (en) * 2015-09-10 2021-12-15 Magentiq Eye Ltd. A system and method for detection of suspicious tissue regions in an endoscopic procedure
US9805255B2 (en) * 2016-01-29 2017-10-31 Conduent Business Services, Llc Temporal fusion of multimodal data from multiple data acquisition systems to automatically recognize and classify an action
US11055537B2 (en) * 2016-04-26 2021-07-06 Disney Enterprises, Inc. Systems and methods for determining actions depicted in media contents based on attention weights of media content frames
CN107977461A (en) * 2017-12-21 2018-05-01 厦门美图之家科技有限公司 A kind of video feature extraction method and device
KR20190078292A (en) * 2017-12-26 2019-07-04 삼성전자주식회사 Device for computing neural network operation, and method of operation thereof
CN109145903A (en) * 2018-08-22 2019-01-04 阿里巴巴集团控股有限公司 A kind of image processing method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104036243A (en) * 2014-06-06 2014-09-10 电子科技大学 Behavior recognition method based on light stream information
CN106980823A (en) * 2017-03-14 2017-07-25 天津大学 A kind of action identification method based on interframe self similarity
CN107194323A (en) * 2017-04-28 2017-09-22 阿里巴巴集团控股有限公司 Car damage identification image acquiring method, device, server and terminal device
CN108960207A (en) * 2018-08-08 2018-12-07 广东工业大学 A kind of method of image recognition, system and associated component

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113486173B (en) * 2021-06-11 2023-09-12 南京邮电大学 Text labeling neural network model and labeling method thereof

Also Published As

Publication number Publication date
WO2020167581A1 (en) 2020-08-20
TWI750498B (en) 2021-12-21
TW202101371A (en) 2021-01-01
EP3857440A1 (en) 2021-08-04
US10943126B2 (en) 2021-03-09
SG11202104426WA (en) 2021-05-28
CN110569702A (en) 2019-12-13
US20200265239A1 (en) 2020-08-20

Similar Documents

Publication Publication Date Title
CN110569702B (en) Video stream processing method and device
Kwon et al. Predicting future frames using retrospective cycle gan
US11195038B2 (en) Device and a method for extracting dynamic information on a scene using a convolutional neural network
US11062460B2 (en) Representation learning using joint semantic vectors
Nguyen et al. Synthesizing the preferred inputs for neurons in neural networks via deep generator networks
KR102519085B1 (en) Method and apparatus of multi-frame super resolution robust to local and global motion
Bouwmans Traditional and recent approaches in background modeling for foreground detection: An overview
JP2020520512A (en) Vehicle appearance feature identification and vehicle search method, device, storage medium, electronic device
Seidel et al. pROST: a smoothed ℓ p-norm robust online subspace tracking method for background subtraction in video
US9111148B2 (en) Unsupervised learning of feature anomalies for a video surveillance system
CN111797653B (en) Image labeling method and device based on high-dimensional image
US20230134967A1 (en) Method for recognizing activities using separate spatial and temporal attention weights
US8103091B2 (en) Object identification parameter learning system
CN112446270A (en) Training method of pedestrian re-identification network, and pedestrian re-identification method and device
Biasutti et al. Lu-net: An efficient network for 3d lidar point cloud semantic segmentation based on end-to-end-learned 3d features and u-net
US20230042187A1 (en) Behavior recognition method and system, electronic device and computer-readable storage medium
CN110647853A (en) Computer-implemented vehicle damage assessment method and device
GB2547760A (en) Method of image processing
CN116824641B (en) Gesture classification method, device, equipment and computer storage medium
Delibasoglu et al. Motion detection in moving camera videos using background modeling and FlowNet
US20160292529A1 (en) Image collation system, image collation method, and program
Dangle et al. Enhanced colorization of thermal images for pedestrian detection using deep convolutional neural networks
CN112396594A (en) Change detection model acquisition method and device, change detection method, computer device and readable storage medium
EP4332910A1 (en) Behavior detection method, electronic device, and computer readable storage medium
CN110929632A (en) Complex scene-oriented vehicle target detection method and device

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
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40018801

Country of ref document: HK

TA01 Transfer of patent application right

Effective date of registration: 20200925

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant after: Innovative advanced technology Co.,Ltd.

Address before: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant before: Advanced innovation technology Co.,Ltd.

Effective date of registration: 20200925

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant after: Advanced innovation technology Co.,Ltd.

Address before: A four-storey 847 mailbox in Grand Cayman Capital Building, British Cayman Islands

Applicant before: Alibaba Group Holding Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant