CN112203142A - Video processing method and device, electronic device and storage medium - Google Patents

Video processing method and device, electronic device and storage medium Download PDF

Info

Publication number
CN112203142A
CN112203142A CN202011398523.8A CN202011398523A CN112203142A CN 112203142 A CN112203142 A CN 112203142A CN 202011398523 A CN202011398523 A CN 202011398523A CN 112203142 A CN112203142 A CN 112203142A
Authority
CN
China
Prior art keywords
image frame
sequence
video
image
feature information
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
CN202011398523.8A
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.)
Zhejiang Yanhua Culture Technology Co Ltd
Original Assignee
Zhejiang Yanhua Culture 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 Zhejiang Yanhua Culture Technology Co Ltd filed Critical Zhejiang Yanhua Culture Technology Co Ltd
Priority to CN202011398523.8A priority Critical patent/CN112203142A/en
Publication of CN112203142A publication Critical patent/CN112203142A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/44008Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving operations for analysing video streams, e.g. detecting features or characteristics in the video stream
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/45Management operations performed by the client for facilitating the reception of or the interaction with the content or administrating data related to the end-user or to the client device itself, e.g. learning user preferences for recommending movies, resolving scheduling conflicts
    • H04N21/454Content or additional data filtering, e.g. blocking advertisements
    • H04N21/4542Blocking scenes or portions of the received content, e.g. censoring scenes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/45Management operations performed by the client for facilitating the reception of or the interaction with the content or administrating data related to the end-user or to the client device itself, e.g. learning user preferences for recommending movies, resolving scheduling conflicts
    • H04N21/454Content or additional data filtering, e.g. blocking advertisements
    • H04N21/4545Input to filtering algorithms, e.g. filtering a region of the image

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Image Analysis (AREA)
  • Television Signal Processing For Recording (AREA)

Abstract

The application relates to a video processing method, a video processing device, an electronic device and a storage medium. The video processing method comprises the following steps: acquiring an image frame sequence of a video to be processed; determining the face feature information of each frame of image in an image frame sequence; matching the face characteristic information of each frame of image in the image frame sequence with preset face characteristic information; and under the condition that a target image frame successfully matched with preset human face feature information exists in the image frame sequence, deleting the target image frame from the image frame sequence, combining the image frame sequence after the target image frame is deleted into a video, and sending the video to the user terminal. By the method and the device, the problem of low video processing efficiency in the related technology is solved, and the video processing efficiency is improved.

Description

Video processing method and device, electronic device and storage medium
Technical Field
The present application relates to the field of video processing, and in particular, to a method and an apparatus for processing video, an electronic apparatus, and a storage medium.
Background
With the rapid development of internet technologies, network video (e.g., movies, television shows, heddles, etc.) contents are flooded in the mass life. However, when a specific person appears in a video and needs to be masked, a worker needs to spend a lot of labor and time to watch the video from the related video for one second, then manually record the time stamp and the number of times of the appearance of the specific person, and then take a video editing tool to delete the shots of the related specific person one by one. For example, when a specific person is deleted from a 120-minute video, a worker needs to spend at least two hours on working hours to view a shot of the person appearing in the video content and then process the shot, which results in a problem of low video processing efficiency.
At present, no effective solution is provided for the problem of low video processing efficiency in the related art.
Disclosure of Invention
The embodiment of the application provides a video processing method, a video processing device, an electronic device and a storage medium, so as to at least solve the problem of low video processing efficiency in the related art.
In a first aspect, an embodiment of the present application provides a video processing method, including:
acquiring an image frame sequence of a video to be processed;
determining the face feature information of each frame of image in the image frame sequence;
matching the face feature information of each frame of image in the image frame sequence with preset face feature information;
and under the condition that a target image frame successfully matched with the preset human face feature information exists in the image frame sequence, deleting the target image frame from the image frame sequence, combining the image frame sequence after the target image frame is deleted into a video, and sending the video to a user terminal.
In some embodiments, determining the facial feature information of each frame of image in the sequence of image frames comprises:
and identifying each frame of image in the image frame sequence through a preset face identification model to obtain the face feature information of each frame of image in the image frame sequence.
In some embodiments, before matching the facial feature information of each frame of image in the image frame sequence with the preset facial feature information, the method further includes:
acquiring a face image sent by the user terminal;
determining face feature information of the face image;
and taking the face feature information of the face image as the preset face feature information.
In some of these embodiments, acquiring a sequence of image frames of a video to be processed comprises:
analyzing the video to be processed to obtain an image frame sequence of the video to be processed, and determining a timestamp corresponding to each frame of image in the image frame sequence;
determining the sequence number of each frame of image in the image frame sequence according to the sequence of the time stamps corresponding to each frame of image;
and saving the sequence number of each frame image in the image frame sequence.
In some embodiments, in the case that a target image frame successfully matched with the preset human face feature information exists in the image frame sequence, deleting the target image frame from the image frame sequence, and combining the image frame sequence after deleting the target image frame into a video to be sent to the user terminal includes:
acquiring the sequence number of a target image frame in the image frame sequence;
and deleting the target image frame from the image frame sequence according to the sequence number of the target image frame in the image frame sequence, combining the image frame sequence after the target image frame is deleted into a video, and sending the video to a user terminal.
In some embodiments, in the case that there is a target image frame successfully matched with the preset facial feature information in the image frame sequence, the method further includes:
acquiring the sequence number of the target image frame in the image frame sequence;
determining a time stamp of the target image frame in the video to be processed according to the sequence number of the target image frame in the image frame sequence;
and marking the timestamp of the target image frame in the video to be processed, and sending the marked video to be processed to a user terminal.
In some embodiments, in the case that there is a target image frame successfully matched with the preset facial feature information in the image frame sequence, the method further includes:
determining sequence numbers of a plurality of target image frames in the image frame sequence;
arranging according to the sequence of the sequence numbers of the target image frames in the image frame sequence;
and sending the arranged target image frames to a user terminal.
In a second aspect, an embodiment of the present application further provides a video processing apparatus, including:
the first acquisition module is used for acquiring an image frame sequence of a video to be processed;
the first determining module is used for determining the face feature information of each frame of image in the image frame sequence;
the matching module is used for matching the face feature information of each frame of image in the image frame sequence with preset face feature information;
and the deleting module is used for deleting the target image frame from the image frame sequence under the condition that the target image frame successfully matched with the preset human face feature information exists in the image frame sequence, combining the image frame sequence after the target image frame is deleted into a video and sending the video to the user terminal.
In a third aspect, an embodiment of the present application provides an electronic device, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and when the processor executes the computer program, the processor implements the video processing method according to the first aspect.
In a fourth aspect, the present application provides a storage medium, on which a computer program is stored, where the program is executed by a processor to implement the video processing method according to the first aspect.
Compared with the related art, the video processing method, the video processing device, the electronic device and the storage medium provided by the embodiment of the application acquire the image frame sequence of the video to be processed; determining the face feature information of each frame of image in an image frame sequence; matching the face characteristic information of each frame of image in the image frame sequence with preset face characteristic information; under the condition that a target image frame successfully matched with preset human face feature information exists in the image frame sequence, the target image frame is deleted from the image frame sequence, and the image frame sequence after the target image frame is deleted is combined into a video to be sent to a user terminal, so that the problem of low video processing efficiency in the related technology is solved, and the video processing efficiency is improved.
The details of one or more embodiments of the application are set forth in the accompanying drawings and the description below to provide a more thorough understanding of the application.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
fig. 1 is a block diagram of a hardware configuration of a terminal of a video processing method according to an embodiment of the present application;
FIG. 2 is a flow chart of a method of processing video according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a video processing apparatus according to a preferred embodiment of the present application;
FIG. 4 is a flow chart of a method of processing video according to a preferred embodiment of the present application;
fig. 5 is a block diagram of a video processing apparatus according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be described and illustrated below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments provided in the present application without any inventive step are within the scope of protection of the present application. Moreover, it should be appreciated that in the development of any such actual implementation, as in any engineering or design project, numerous implementation-specific decisions must be made to achieve the developers' specific goals, such as compliance with system-related and business-related constraints, which may vary from one implementation to another.
Reference in the specification to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the specification. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of ordinary skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments without conflict.
Unless defined otherwise, technical or scientific terms referred to herein shall have the ordinary meaning as understood by those of ordinary skill in the art to which this application belongs. Reference to "a," "an," "the," and similar words throughout this application are not to be construed as limiting in number, and may refer to the singular or the plural. The present application is directed to the use of the terms "including," "comprising," "having," and any variations thereof, which are intended to cover non-exclusive inclusions; for example, a process, method, system, article, or apparatus that comprises a list of steps or modules (elements) is not limited to the listed steps or elements, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus. Reference to "connected," "coupled," and the like in this application is not intended to be limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. Reference herein to "a plurality" means greater than or equal to two. "and/or" describes an association relationship of associated objects, meaning that three relationships may exist, for example, "A and/or B" may mean: a exists alone, A and B exist simultaneously, and B exists alone. Reference herein to the terms "first," "second," "third," and the like, are merely to distinguish similar objects and do not denote a particular ordering for the objects.
The method provided by the embodiment can be executed in a terminal, a computer or a similar operation device. Taking an example of the video processing method running on a terminal, fig. 1 is a block diagram of a hardware structure of the terminal according to the video processing method of the embodiment of the present application. As shown in fig. 1, the terminal may include one or more (only one shown in fig. 1) processors 102 (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, and optionally, a transmission device 106 for communication functions and an input-output device 108. It will be understood by those skilled in the art that the structure shown in fig. 1 is only an illustration and is not intended to limit the structure of the terminal. For example, the terminal may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.
The memory 104 may be used to store a computer program, for example, a software program and a module of an application software, such as a computer program corresponding to the video processing method in the embodiment of the present invention, and the processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, so as to implement the method described above. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory located remotely from the processor 102, which may be connected to the terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the terminal. In one example, the transmission device 106 includes a Network adapter (NIC) that can be connected to other Network devices through a base station to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used to communicate with the internet in a wireless manner.
The present embodiment provides a video processing method, and fig. 2 is a flowchart of a video processing method according to an embodiment of the present application, where as shown in fig. 2, the flowchart includes the following steps:
step S201, an image frame sequence of a video to be processed is acquired.
In this step, the video to be processed is sent by the user terminal, or may be obtained from a database in which the video to be processed is stored.
It should be noted that a preset format may be preset, where the preset format may be a video format that can be processed by a device that processes a video to be processed. In some embodiments, the video to be processed can also satisfy the video format that can be processed by the device that processes the video to be processed by processing the video to be processed into the preset format, so that the device that processes the video to be processed can acquire the image frame sequence of the video to be processed.
In some embodiments, when an image frame sequence of a video to be processed is obtained, a timestamp of each frame of image in the video to be processed may be recorded, and a sequence number may be marked for each frame of image according to a sequence of the timestamps of each frame of image, so that in step S204, a target image frame in the image frame sequence may be adaptively queried according to the timestamp and the marked sequence number of each recorded frame of image in the video to be processed, thereby avoiding a problem of low video processing efficiency caused by a manual query in related technologies.
Step S202, determining the face feature information of each frame of image in the image frame sequence.
In this step, the face feature information of each frame of image may be extracted through a face recognition model, where the face recognition model may be a Histogram of Oriented Histograms (HOG) feature extraction model, a convolutional neural network model, or the like, or may be another way capable of extracting face feature information in the related art, and this is not limited in this embodiment of the present application.
Step S203, matching the face feature information of each frame of image in the image frame sequence with the preset face feature information.
In this step, the preset face feature information may be configured online in real time by the user; or may be pre-stored in the cache.
And step S204, under the condition that a target image frame successfully matched with the preset human face feature information exists in the image frame sequence, deleting the target image frame from the image frame sequence, combining the image frame sequence after the target image frame is deleted into a video and sending the video to the user terminal.
It should be noted that, the determination condition of the target image frame successfully matched with the preset face feature information may be that the matching similarity between the preset face feature information and the person feature information of each frame of image is greater than a preset value of the user, and it may be considered that the preset face feature information is successfully matched with the target image frame.
Based on the steps S201 to S204, the image frame sequence in the video to be processed is obtained, the face feature information of each frame of image is determined, then the face feature information of each frame of image is matched according to the preset face feature information, the target image frame successfully matched is deleted under the condition of successful matching, and finally the image frame sequence after the target image frame is combined into the video to be sent to the user terminal, so that the corresponding deletion operation of the video is not needed manually, the problem of low video processing efficiency in the related technology is solved, and the video processing efficiency is improved.
In some embodiments, the determining the facial feature information of each frame of image in the image frame sequence in step S202 may include: and recognizing each frame of image in the image frame sequence through a preset face recognition model to obtain the face characteristic information of each frame of image in the image frame sequence.
It should be noted that the designated face image provided by the user may be used as a training sample. In order to improve the accuracy of the training result of the face recognition model, aiming at the specified face image provided by the user, more than a preset number of training samples of the specified face image can be obtained to train the face recognition model, so as to obtain a preset face recognition model with complete training. Alternatively, the preset number may be 100 sheets. The above is only the preset number manner provided by the embodiment of the present application, and the user may also arbitrarily set the specific content of the preset number according to the own requirement, which is not limited herein.
In this embodiment, the preset face recognition model with complete training can be used to extract the face feature information of each frame of image in the image frame sequence, and the accuracy of extracting the face feature information can be improved.
In some embodiments, before matching the face feature information of each frame of image in the image frame sequence with the preset face feature information, a face image sent by a user terminal can be obtained; determining face feature information of a face image; and taking the face feature information of the face image as preset face feature information.
In this embodiment, the face feature information of the face image sent by the user terminal is used as the preset face feature information, so that matching according to the interested face of the user can be realized, and the user experience is enhanced.
In some embodiments, the preset face feature information may also be obtained from a local cache in which the preset face feature information is stored, where the face feature information may be pre-configured and stored in the local cache, and by this way, the processing flow of the video to be processed is simplified.
In other embodiments, the face image may also be configured online by the user through the configuration module, for example, when the user needs to query a specific person in the video to be processed, the face image corresponding to the specific person may be input in the configuration module, and then the face feature information of the face image is used as the preset feature information. By the method, convenience of man-machine operation interaction is improved, matching can be achieved according to interested people of the user, and user experience is enhanced.
In some embodiments, the acquiring of the image frame sequence of the video to be processed in step S201 may include: analyzing a video to be processed, acquiring an image frame sequence of the video to be processed, and determining a timestamp corresponding to each frame of image in the image frame sequence; determining the sequence number of each frame of image in the image frame sequence according to the sequence of the time stamps corresponding to each frame of image; and saving the sequence number of each frame image in the image frame sequence.
In this embodiment, the acquisition of the image frame sequence is realized by analyzing the video to be processed, and meanwhile, by determining the timestamps corresponding to each frame of image in the image frame sequence, and performing sequence number marking on each frame of image according to the sequence of the timestamps corresponding to each frame of image, and storing the sequence numbers of each frame of image in the image frame sequence, it may be convenient to subsequently query the corresponding image frames according to the corresponding sequence numbers of the image frames in the image frame sequence, and perform corresponding processing operations, for example, delete a target image frame in the video to be processed or combine a plurality of target image frames into a video, and the like.
In some embodiments, in the case that a target image frame successfully matched with the preset human face feature information exists in the image frame sequence, deleting the target image frame from the image frame sequence, and combining the image frame sequence after deleting the target image frame into a video to be sent to the user terminal may include: acquiring the sequence number of a target image frame in an image frame sequence; and deleting the target image frame from the image frame sequence according to the sequence number of the target image frame in the image frame sequence, combining the image frame sequence after the target image frame is deleted into a video and sending the video to the user terminal.
In this embodiment, the sequence number of the target image frame in the image frame sequence may be determined by obtaining the sequence number of each frame of image stored in the above embodiment, and then the target image frame is deleted according to the sequence number, so that corresponding deletion operation does not need to be performed manually, the image frame processing process is simplified, and the video processing efficiency is further improved.
For example, if there are 100 image frames in the image frame sequence, each image frame may be labeled with a sequence number according to the sequence of the timestamp of each image frame in the video to be processed, which is labeled as image frame 1, image frame 2, … …, and image frame 100. When the sequence number of the target image frame is determined to be 55, the 55 th image frame in the image frame sequence can be deleted according to the sequence number, and the image frame sequence after the image frame 55 is deleted is combined into a new video to be sent to the user terminal, so as to delete the target image frame of the video frame to be processed. The numerical values in the present embodiment are only for example, and the technical solution of the present application is not limited to the numerical values in the embodiment.
It should be noted that there may be one or more, and in some embodiments, there may be none of the target image frames.
In some embodiments, when a target image frame successfully matched with preset human face feature information exists in the image frame sequence, the sequence number of the target image frame in the image frame sequence can be further acquired; determining a time stamp of the target image frame in the video to be processed according to the sequence number of the target image frame in the image frame sequence; and marking the time stamp of the target image frame in the video to be processed, and sending the marked video to be processed to the user terminal.
In this embodiment, by means of marking the target image frame in the video to be processed and sending the marked video to be processed to the user terminal, the deleted target image frame can be conveniently verified according to the marked video to be processed, and the accuracy of deleting the target image frame is further improved.
In some embodiments, in the case that a target image frame successfully matched with preset human face feature information exists in the image frame sequence, sequence numbers of a plurality of target image frames in the image frame sequence can also be determined; arranging according to the sequence of the sequence numbers of the plurality of target image frames in the image frame sequence; and sending the arranged target image frames to the user terminal.
In this embodiment, by sequentially sending the plurality of target image frames to the user terminal according to the sequence of the timestamps in the video to be processed, it is convenient to search the corresponding target image frames from the video to be processed for corresponding operations according to the sequence of the target image frames in the image frame sequence and the timestamps in the video to be processed, and it is not necessary to manually query the target image frames, thereby further improving the video processing efficiency. Meanwhile, the deleted target image frame can be verified conveniently according to the marked to-be-processed video, and the accuracy of deleting the target image frame is improved.
It should be noted that the manner of sending the arranged target image frames to the user terminal may be sending the target image frames to the user terminal one by one according to the sequence, or combining the target image frames into a new video sending user terminal according to the sequence, and the like, and the sending manner may be selected by the user according to the setting, and the application is not limited.
The embodiments of the present application are described and illustrated below by means of preferred embodiments.
Fig. 3 is a schematic structural diagram of a video processing apparatus according to a preferred embodiment of the present application, to which the above-mentioned video processing method can be applied, and as shown in fig. 3, the apparatus includes:
the configuration module 31 may be configured to configure video information of a video to be processed and face feature information of a face image; the specific face image uploaded in the configuration module 31 may be used to specify a person, configure the path of the video file, and use the uploaded video file as a video to be processed;
the video analyzing module 32 is configured to analyze the video to be processed, analyze the facial feature information of each frame of image in the video to be processed, perform sequencing recording according to the time stamp sequence of each frame of image in the video to be processed, and record the time stamp of each frame of image in the video to be processed.
The face recognition module 33 is configured to recognize whether each frame of image in the video to be processed includes face feature information corresponding to a specified face image, and sequentially record and store a sequence number of a target image frame including the face feature information of the specified face image and timestamp information of the target image frame in the video to be processed in the recording module 34. The face recognition module 33 may use an opencv picture face recognition toolkit, or a face recognition model, etc.
It should be noted that opencv is a BSD license (open source) based cross-platform computer vision and machine learning software library, which can run on Linux, Windows, Android, and MacOS operating systems.
The recording module 34 is configured to store a sequence number of a target image frame in the to-be-processed video, where the target image frame includes face feature information of a specified face image, and timestamp information in the to-be-processed video where the target image frame is located. By this recording module 34, it is possible to facilitate the video processing by the video processing module 35 and return the time stamp information of the target image frame containing the face feature information of the specified face image to the relevant person (user terminal).
And the video processing module 35 is configured to delete the corresponding target image frame from the video to be processed according to the sequence number and the timestamp information of the target image frame, which is stored in the recording module 34 and contains the facial feature information of the specified face image, and export the target image frame to a relevant person (user terminal) after deleting all the target image frames containing the facial feature information of the specified face image.
Fig. 4 is a flow chart of a video processing method according to a preferred embodiment of the present application. The method can also be applied to the device in fig. 3, as shown in fig. 4, the method flow includes the following steps:
step S401, the configuration module 31 obtains the face feature information of the video and the face image to be processed.
In this embodiment, a specific video file may be selected or uploaded for pending processing by the configuration module 31. And acquiring a face image to be processed for specifying a specific figure, so as to conveniently inquire a corresponding new face feature shot in the video to be processed according to the face feature information corresponding to the face image in the subsequent steps.
Step S402, the uploaded video to be processed is analyzed by the video analysis module 32, face feature information corresponding to each frame of image of the video to be processed is extracted, and sequence number information and timestamp information of each frame of image in the video to be processed are extracted. So as to record and locate the specific sequence number information and the time stamp of the corresponding shot or target image frame in step S403.
Step S403, matching the facial feature information of the facial image with the facial feature information corresponding to each frame of image according to each frame of image analyzed in step S402, recording and storing the sequence number information and the timestamp information of the target image frame containing the facial feature information of the specified facial image, and combining all target image frames in the video to be processed into a sequence number information set of the target image frame containing the facial feature information of the specified facial image. So as to facilitate the video processing in step S404, such as deleting the target image frame.
And S404, sequentially deleting the target image frames at the corresponding positions in the video to be processed according to the sequence number information set of the target image frames containing the face feature information of the specified face image in the S403, and generating a new video file after deleting the target image frames. So that step S405 is exported to the user terminal.
In step S405, the new video file generated in S404 is exported to the user terminal.
In other embodiments, the timestamp information of the target image frame containing the face feature information of the specified face image in the video to be processed may also be derived or presented to the user terminal in chronological order. The user can conveniently verify.
Through the embodiment, the function of automatically identifying the face feature information of the specified face image in the video to be processed is realized, the time stamp of the shot of the face feature information of the face image in the video to be processed is automatically recorded, the target image frame can be automatically deleted, and finally, a video which is processed and has no face feature information of the face image is returned to a worker, so that the problem of low video processing efficiency in the related technology is solved, and the video processing efficiency is improved. Meanwhile, the embodiment of the application can also be used for checking whether the target image frame containing the face feature information of the specified face image appears in one video. Meanwhile, related personnel can conveniently carry out manual examination and verification according to the timestamp information of the target image frame containing the face feature information of the specified face image, the efficiency of video processing is improved, and a large amount of manual work is replaced.
This embodiment further provides a video processing apparatus, which is used to implement the foregoing embodiments and preferred embodiments, and the description of the apparatus is omitted here. As used hereinafter, the terms "module," "unit," "subunit," and the like may implement a combination of software and/or hardware for a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 5 is a block diagram of a video processing apparatus according to an embodiment of the present application, and as shown in fig. 5, the apparatus includes:
a first obtaining module 51, configured to obtain an image frame sequence of a video to be processed;
a first determining module 52, coupled to the first obtaining module 51, for determining facial feature information of each frame of image in the image frame sequence;
a matching module 53, coupled to the first determining module 52, configured to match the facial feature information of each frame of image in the image frame sequence with preset facial feature information;
and the deleting module 54 is coupled to the matching module 53, and is configured to delete the target image frame from the image frame sequence if a target image frame successfully matched with the preset human face feature information exists in the image frame sequence, and combine the image frame sequence after the target image frame is deleted into a video to be sent to the user terminal.
In some of these embodiments, the first determination module 52 includes: and the recognition unit is used for recognizing each frame of image in the image frame sequence through a preset face recognition model to obtain the face feature information of each frame of image in the image frame sequence.
In some of these embodiments, the apparatus further comprises: the second acquisition module is used for acquiring a face image sent by the user terminal; the second determining module is used for determining the face feature information of the face image; and the processing module is used for taking the face feature information of the face image as preset face feature information.
In some of these embodiments, the first obtaining module 51 includes: the first acquisition unit is used for analyzing the video to be processed, acquiring an image frame sequence of the video to be processed and determining a timestamp corresponding to each frame of image in the image frame sequence; the first determining unit is used for determining the sequence number of each frame of image in the image frame sequence according to the sequence of the time stamps corresponding to each frame of image; and the storage unit is used for storing the sequence number of each frame of image in the image frame sequence.
In some of these embodiments, the deletion module 54 includes: the second acquisition unit is used for acquiring the serial number of the target image frame in the image frame sequence; and the deleting unit is used for deleting the target image frame from the image frame sequence according to the serial number of the target image frame in the image frame sequence, combining the image frame sequence after the target image frame is deleted into a video and sending the video to the user terminal.
In some of these embodiments, the apparatus further comprises: the third acquisition module is used for acquiring the serial number of the target image frame in the image frame sequence; the third determining module is used for determining the time stamp of the target image frame in the video to be processed according to the sequence number of the target image frame in the image frame sequence; and the marking module is used for marking the timestamp of the target image frame in the video to be processed and sending the marked video to be processed to the user terminal.
In some of these embodiments, the apparatus further comprises: the fourth determining module is used for determining the serial numbers of the target image frames in the image frame sequence; the sequencing module is used for sequencing the sequence numbers of the target image frames in the image frame sequence; and the sending module is used for sending the arranged target image frames to the user terminal.
The above modules may be functional modules or program modules, and may be implemented by software or hardware. For a module implemented by hardware, the modules may be located in the same processor; or the modules can be respectively positioned in different processors in any combination.
The present embodiment also provides an electronic device comprising a memory having a computer program stored therein and a processor configured to execute the computer program to perform the steps of any of the above method embodiments.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
step S201, an image frame sequence of a video to be processed is acquired.
Step S202, determining the face feature information of each frame of image in the image frame sequence.
Step S203, matching the face feature information of each frame of image in the image frame sequence with the preset face feature information.
And step S204, under the condition that a target image frame successfully matched with the preset human face feature information exists in the image frame sequence, deleting the target image frame from the image frame sequence, combining the image frame sequence after the target image frame is deleted into a video and sending the video to the user terminal.
It should be noted that, for specific examples in this embodiment, reference may be made to examples described in the foregoing embodiments and optional implementations, and details of this embodiment are not described herein again.
In addition, in combination with the video processing method in the foregoing embodiments, the embodiments of the present application may provide a storage medium to implement. The storage medium having stored thereon a computer program; the computer program, when executed by a processor, implements a method of processing video as in any of the above embodiments.
It should be understood by those skilled in the art that various features of the above-described embodiments can be combined in any combination, and for the sake of brevity, all possible combinations of features in the above-described embodiments are not described in detail, but rather, all combinations of features which are not inconsistent with each other should be construed as being within the scope of the present disclosure.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A method for processing video, comprising:
acquiring an image frame sequence of a video to be processed;
determining the face feature information of each frame of image in the image frame sequence;
matching the face feature information of each frame of image in the image frame sequence with preset face feature information;
and under the condition that a target image frame successfully matched with the preset human face feature information exists in the image frame sequence, deleting the target image frame from the image frame sequence, combining the image frame sequence after the target image frame is deleted into a video, and sending the video to a user terminal.
2. The method of claim 1, wherein determining the facial feature information of each frame of image in the sequence of image frames comprises:
and identifying each frame of image in the image frame sequence through a preset face identification model to obtain the face feature information of each frame of image in the image frame sequence.
3. The method of claim 1, wherein before matching the facial feature information of each frame of image in the image frame sequence with the preset facial feature information, the method further comprises:
acquiring a face image sent by the user terminal;
determining face feature information of the face image;
and taking the face feature information of the face image as the preset face feature information.
4. The method of claim 1, wherein obtaining a sequence of image frames of a video to be processed comprises:
analyzing the video to be processed to obtain an image frame sequence of the video to be processed, and determining a timestamp corresponding to each frame of image in the image frame sequence;
determining the sequence number of each frame of image in the image frame sequence according to the sequence of the time stamps corresponding to each frame of image;
and saving the sequence number of each frame image in the image frame sequence.
5. The method of claim 4, wherein in a case that a target image frame successfully matched with the preset human face feature information exists in the image frame sequence, deleting the target image frame from the image frame sequence, and combining the image frame sequence after deleting the target image frame into a video to be sent to the user terminal comprises:
acquiring the sequence number of a target image frame in the image frame sequence;
and deleting the target image frame from the image frame sequence according to the sequence number of the target image frame in the image frame sequence, combining the image frame sequence after the target image frame is deleted into a video, and sending the video to a user terminal.
6. The method for processing the video according to claim 4, wherein in the case that a target image frame successfully matched with the preset human face feature information exists in the image frame sequence, the method further comprises:
acquiring the sequence number of the target image frame in the image frame sequence;
determining a time stamp of the target image frame in the video to be processed according to the sequence number of the target image frame in the image frame sequence;
and marking the timestamp of the target image frame in the video to be processed, and sending the marked video to be processed to a user terminal.
7. The method for processing the video according to claim 4, wherein in the case that a target image frame successfully matched with the preset human face feature information exists in the image frame sequence, the method further comprises:
determining sequence numbers of a plurality of target image frames in the image frame sequence;
arranging according to the sequence of the sequence numbers of the target image frames in the image frame sequence;
and sending the arranged target image frames to a user terminal.
8. An apparatus for processing video, comprising:
the first acquisition module is used for acquiring an image frame sequence of a video to be processed;
the first determining module is used for determining the face feature information of each frame of image in the image frame sequence;
the matching module is used for matching the face feature information of each frame of image in the image frame sequence with preset face feature information;
and the deleting module is used for deleting the target image frame from the image frame sequence under the condition that the target image frame successfully matched with the preset human face feature information exists in the image frame sequence, combining the image frame sequence after the target image frame is deleted into a video and sending the video to the user terminal.
9. An electronic device comprising a memory and a processor, wherein the memory has stored therein a computer program, and the processor is configured to execute the computer program to perform the method of processing video according to any one of claims 1 to 7.
10. A storage medium having stored thereon a computer program, wherein the computer program is arranged to perform the method of processing video of any of claims 1 to 7 when executed.
CN202011398523.8A 2020-12-03 2020-12-03 Video processing method and device, electronic device and storage medium Pending CN112203142A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011398523.8A CN112203142A (en) 2020-12-03 2020-12-03 Video processing method and device, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011398523.8A CN112203142A (en) 2020-12-03 2020-12-03 Video processing method and device, electronic device and storage medium

Publications (1)

Publication Number Publication Date
CN112203142A true CN112203142A (en) 2021-01-08

Family

ID=74033765

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011398523.8A Pending CN112203142A (en) 2020-12-03 2020-12-03 Video processing method and device, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN112203142A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112818172A (en) * 2021-01-18 2021-05-18 浙江大华技术股份有限公司 Video retrieval method, electronic device and storage medium
CN113315691A (en) * 2021-05-20 2021-08-27 维沃移动通信有限公司 Video processing method and device and electronic equipment
CN113691729A (en) * 2021-08-27 2021-11-23 维沃移动通信有限公司 Image processing method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018092384A1 (en) * 2016-11-21 2018-05-24 ソニー株式会社 Information processing device, information processing method, and program
CN109120994A (en) * 2017-06-22 2019-01-01 中兴通讯股份有限公司 A kind of automatic editing method, apparatus of video file and computer-readable medium
CN109241345A (en) * 2018-10-10 2019-01-18 百度在线网络技术(北京)有限公司 Video locating method and device based on recognition of face
CN110996112A (en) * 2019-12-05 2020-04-10 成都市喜爱科技有限公司 Video editing method, device, server and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018092384A1 (en) * 2016-11-21 2018-05-24 ソニー株式会社 Information processing device, information processing method, and program
CN109120994A (en) * 2017-06-22 2019-01-01 中兴通讯股份有限公司 A kind of automatic editing method, apparatus of video file and computer-readable medium
CN109241345A (en) * 2018-10-10 2019-01-18 百度在线网络技术(北京)有限公司 Video locating method and device based on recognition of face
CN110996112A (en) * 2019-12-05 2020-04-10 成都市喜爱科技有限公司 Video editing method, device, server and storage medium

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112818172A (en) * 2021-01-18 2021-05-18 浙江大华技术股份有限公司 Video retrieval method, electronic device and storage medium
CN113315691A (en) * 2021-05-20 2021-08-27 维沃移动通信有限公司 Video processing method and device and electronic equipment
CN113315691B (en) * 2021-05-20 2023-02-24 维沃移动通信有限公司 Video processing method and device and electronic equipment
CN113691729A (en) * 2021-08-27 2021-11-23 维沃移动通信有限公司 Image processing method and device
CN113691729B (en) * 2021-08-27 2023-08-22 维沃移动通信有限公司 Image processing method and device

Similar Documents

Publication Publication Date Title
CN112203142A (en) Video processing method and device, electronic device and storage medium
US10762353B2 (en) Inmate tracking system in a controlled environment
CN109388319B (en) Screenshot method, screenshot device, storage medium and terminal equipment
CN109684978A (en) Employees'Emotions monitoring method, device, computer equipment and storage medium
CN108881813A (en) A kind of video data handling procedure and device, monitoring system
CN107103029B (en) Image data processing method for robot
CN112667510A (en) Test method, test device, electronic equipment and storage medium
CN107872713A (en) Short processing system for video, method and device
CN113591576A (en) Food material information detection method and device, storage medium and electronic device
CN107910006A (en) Audio recognition method, device and multiple source speech differentiation identifying system
WO2019242156A1 (en) Method and device for controlling application in terminal, and computer readable storage medium
CN112686744A (en) Method and device for monitoring external access service, electronic equipment and storage medium
CN112434049A (en) Table data storage method and device, storage medium and electronic device
CN109492602B (en) Process timing method and system based on human body language
CN111259198A (en) Management method and device for shot materials and electronic equipment
CN110895555B (en) Data retrieval method and device, storage medium and electronic device
CN109376581B (en) Object relation recognition method and device, storage medium and electronic device
CN113627335A (en) Method and device for monitoring behavior of examinee, storage medium and electronic device
CN115866348A (en) Data processing method, device and system based on two-dimensional code
CN111008304B (en) Keyword generation method and device, storage medium and electronic device
CN110415689A (en) Speech recognition equipment and method
CN111274431A (en) Image retrieval processing method and device
CN106845355B (en) A kind of method of recognition of face, server and system
CN110895563A (en) Text retrieval method and device
CN116225338B (en) Data processing method and device based on time sequence information and storage information

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20210108

RJ01 Rejection of invention patent application after publication