CN111553191A - Video classification method and device based on face recognition and storage medium - Google Patents
Video classification method and device based on face recognition and storage medium Download PDFInfo
- Publication number
- CN111553191A CN111553191A CN202010237343.5A CN202010237343A CN111553191A CN 111553191 A CN111553191 A CN 111553191A CN 202010237343 A CN202010237343 A CN 202010237343A CN 111553191 A CN111553191 A CN 111553191A
- Authority
- CN
- China
- Prior art keywords
- face
- video
- image
- videos
- code
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 55
- 238000012545 processing Methods 0.000 claims abstract description 23
- 238000012163 sequencing technique Methods 0.000 claims abstract description 18
- 238000000605 extraction Methods 0.000 claims description 26
- 238000010606 normalization Methods 0.000 claims description 10
- 238000012216 screening Methods 0.000 claims description 10
- 238000007781 pre-processing Methods 0.000 claims description 8
- 238000003707 image sharpening Methods 0.000 claims description 5
- 238000012549 training Methods 0.000 claims description 4
- 230000008569 process Effects 0.000 description 7
- 238000010586 diagram Methods 0.000 description 5
- 230000006870 function Effects 0.000 description 5
- 238000004891 communication Methods 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 2
- 239000004973 liquid crystal related substance Substances 0.000 description 2
- 241001465754 Metazoa Species 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/10—Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
- G06V40/16—Human faces, e.g. facial parts, sketches or expressions
- G06V40/168—Feature extraction; Face representation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/22—Matching criteria, e.g. proximity measures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/40—Scenes; Scene-specific elements in video content
- G06V20/41—Higher-level, semantic clustering, classification or understanding of video scenes, e.g. detection, labelling or Markovian modelling of sport events or news items
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/10—Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
- G06V40/16—Human faces, e.g. facial parts, sketches or expressions
- G06V40/172—Classification, e.g. identification
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Physics & Mathematics (AREA)
- Multimedia (AREA)
- Oral & Maxillofacial Surgery (AREA)
- Health & Medical Sciences (AREA)
- Data Mining & Analysis (AREA)
- Human Computer Interaction (AREA)
- General Health & Medical Sciences (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Bioinformatics & Computational Biology (AREA)
- General Engineering & Computer Science (AREA)
- Evolutionary Computation (AREA)
- Evolutionary Biology (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Artificial Intelligence (AREA)
- Life Sciences & Earth Sciences (AREA)
- Computational Linguistics (AREA)
- Software Systems (AREA)
- Image Analysis (AREA)
Abstract
The invention belongs to the technical field of video image processing, and provides a video classification method and device based on face recognition and a computer readable storage medium, wherein the method comprises the following steps: extracting a face image of a video to be processed according to the video classification instruction; inputting the face image into a preset face coding model to obtain a face code; merging the same face codes in the video to be processed to obtain a single face code; classifying the videos to be processed with the same single face code to obtain a first class video; and sequencing the first type of videos according to a video playing rule to obtain the similar videos. The invention can automatically classify videos of the same person, effectively reduce the workload of video classification, improve the classification efficiency and facilitate the watching of users.
Description
Technical Field
The invention belongs to the technical field of video image processing, and particularly relates to a video classification method and device based on face recognition and a computer readable storage medium.
Background
With the rise of mobile social media technology, videos are popular with the public as an entertaining content display form. Especially, the short video with characters is more and more popular with people along with the development of short video production software. The videos shot by people, received videos or downloaded videos are all stored in one file, and the watching is inconvenient.
The current video classification method is to manually classify videos or add classification labels, which is a heavy workload, and the classification of videos is generally a large category classification, for example: scenery, figures, shows, etc. When a user needs to check a specific person, the user needs to check the videos one by one from the video files of the person categories, the checking is very troublesome, and the added new videos need to be checked and the categories are determined and then manually added to the existing video category files, so that automatic classification cannot be realized.
Disclosure of Invention
Based on the problems in the prior art, the invention provides a video classification method, a device and a computer-readable storage medium based on face recognition, and mainly aims to automatically classify videos of the same person by performing face image extraction, face image coding merging, face recognition, video sequencing and other processing on the videos to be classified, and directly add videos with the same person added subsequently into an existing video classification file, thereby effectively reducing the workload of video classification, improving the classification efficiency and facilitating the watching of users.
In a first aspect, to achieve the above object, the present invention provides a video classification method based on face recognition, including:
extracting a face image of a video to be processed according to the video classification instruction;
inputting the face image into a preset face coding model to obtain a face code;
merging the same face codes in the video to be processed to obtain a single face code;
classifying the videos to be processed with the same single face code to obtain a first class video;
and sequencing the first type of videos according to a video playing rule to obtain the similar videos.
In a second aspect, to achieve the above object, the present invention further provides an electronic device, including: the video classification program based on the face recognition is stored in the memory and is executed by the processor to realize the following steps:
extracting a face image of a video to be processed according to the video classification instruction;
inputting the face image into a preset face coding model to obtain a face code;
merging the same face codes in the video to be processed to obtain a single face code;
classifying the videos to be processed with the same single face code to obtain a first class video;
and sequencing the first type of videos according to a video playing rule to obtain the similar videos.
In a third aspect, to achieve the above object, the present invention further provides a computer-readable storage medium, in which a video classification program based on face recognition is stored, and when the video classification program based on face recognition is executed by a processor, any step in the video classification method based on face recognition as described above is implemented.
According to the video classification method and device based on face recognition and the computer readable storage medium, the videos of the same person can be automatically classified by carrying out processing such as face image extraction, face image coding combination, face recognition, video sequencing and the like on the videos to be classified, and the videos with the same person added subsequently can be directly added into the existing video classification file, so that the workload of video classification is effectively reduced, the classification efficiency is improved, and the videos can be conveniently watched by a user.
Drawings
FIG. 1 is a flow chart of a preferred embodiment of a video classification method based on face recognition according to the present invention;
FIG. 2 is a schematic diagram of an application environment of a video classification method based on face recognition according to a preferred embodiment of the present invention;
FIG. 3 is a block diagram illustrating a preferred embodiment of the face recognition based video classification process of FIG. 2;
fig. 4 is a system logic diagram corresponding to the video classification method based on face recognition of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
The invention provides a video classification method based on face recognition. Referring to fig. 1, a flow chart of a preferred embodiment of the video classification method based on face recognition according to the present invention is shown. The method may be performed by an apparatus, which may be implemented by software and/or hardware.
As shown in fig. 1, in this embodiment, a video classification method based on face recognition includes: step S110-step S150.
And step S110, extracting the face image of the video to be processed according to the video classification instruction.
Specifically, the current video classification method is to classify videos mixed in the same video file into large categories, such as landscape videos, character videos, performance videos, animal videos, and the like, wherein for the character videos, all videos related to characters are stored in the same file, however, when a user views the videos, if the user wants to see a specific character video, the user needs to open the videos related to the character one by one, which is inconvenient to view, and when the storage amount of the character videos is large, the user is bothered, i.e., troublesome, time is wasted, and there is a possibility of omission.
In the embodiment of the invention, when the processor acquires a video classification instruction, the processor performs face image extraction processing on the to-be-processed video stored in the person category video file (or the person category video library), wherein the to-be-processed video is a video obtained by network downloading, chat software downloading or shooting through a camera device, and finally a video image with a face of each to-be-processed video is obtained.
Wherein, extracting the face image of the video to be processed according to the video classification instruction comprises:
carrying out image extraction processing on a video to be processed according to a preset extraction frequency to obtain a video image;
and carrying out face screening processing on the video image to obtain a face image.
Specifically, each video to be processed is subjected to image extraction processing according to a preset extraction frequency, wherein the extraction frequency can be adjusted according to practical application, for example, one frame of image is extracted every 1 second, the images extracted from each video to be processed are respectively stored, and the video image extracted from each video to be processed has an image without a face, so that the video image of each video to be processed needs to be subjected to face screening processing by a face screening technology, and the video image without the face is removed to obtain a video image with the face.
And step S120, inputting the face image into a preset face coding model to obtain a face code.
Specifically, a plurality of people may appear in one video to be processed, and in order to facilitate distinguishing the video images with faces, the video images with faces need to be subjected to face coding, and different face images can be quickly coded by adopting a preset face coding model.
Wherein, in inputting the human face image into the preset human face coding model, before obtaining the human face code, the video classification based on human face recognition further includes:
collecting a face image sample, and matching face codes for the face image sample;
extracting feature data of the face image sample, and establishing a corresponding relation between the feature data of the face image sample and face codes;
and establishing a basic model, training the basic model according to the corresponding relation between the feature data of the face image sample and the face code, and generating a preset face code model.
Specifically, the face image may be collected from a video storage file of a person class (or a video repository of a person class) or a big data platform, etc. as an image sample, and the source of the face image sample is selected according to actual needs, which is not particularly limited herein.
A plurality of images with human faces can be obtained from a video to be processed, and in order to avoid the repetition of the human face images of the same person, the human face images of the same person can be coded by a human face recognition method. When the face image is collected, the face image is matched with the corresponding face code, the face code is the name or number of the person involved in the face image, for example, when a certain face image sample is collected as a face image with three sheets, the face code matched with the face image with three sheets can be three sheets, or the face code with the number 1 as the face image with three sheets can be used, when the collected face image has different persons with the same name, the face code can also be used in a form of the name plus the number, for example, when the names of two persons are the same as three sheets, the face code can be carried out on the face image into three sheets 1 and three sheets 2 for distinguishing.
The method for obtaining the face code comprises the following steps of inputting a face image into a preset face code model:
preprocessing the face image to obtain a clear face video image, wherein the preprocessing comprises the following steps: image sharpening, background removal, geometric normalization and gray level normalization;
carrying out face feature extraction processing on the clear face video image to obtain face feature data;
comparing the face characteristic data with face image sample characteristic data in a preset face coding model to obtain most similar face image sample characteristic data;
and outputting the face code corresponding to the most similar face image sample characteristic data according to the most similar face image sample characteristic data.
Specifically, the contour of the image is compensated through image sharpening, the edge of the image and the part with gray level jump are enhanced, and the image becomes clear; removing the background in the face image through background removal, so that face identification is facilitated; carrying out a series of standard processing transformation on the image through geometric normalization to enable the image to be transformed into a fixed standard form; reducing or even eliminating the gray level inconsistency in the image through gray level normalization to obtain a clear face image, extracting face characteristic data through a face characteristic extraction technology, comparing the face characteristic data with face image sample characteristic data in a preset face coding model, and outputting a face code corresponding to the most similar face image sample characteristic data according to the most similar face image sample characteristic data.
Step S130, merging the same face codes in the video to be processed to obtain a single face code.
Specifically, when the same face codes exist in the same video to be processed, the same face codes are combined, for example, when 10 identical face codes appear in one video to be processed, 10 identical face codes are combined into one face code, for example, 10 faces appear in three, and then 1 person code of three is finally obtained.
The merging processing is carried out on the same face codes in the video to be processed, and the obtaining of the single face code comprises the following steps:
screening the face codes in the video to be processed to screen out the same face codes;
and merging the same face codes to obtain a single face code.
Step S140, the videos to be processed with the same single face code are classified to obtain a first class video.
Specifically, comparing single face codes in each video to be processed, classifying the videos to be processed with the same single face code into a class of videos, for example, 3 videos to be processed, wherein the first video to be processed has 3 different characters, namely a first character 1, a second character Liyi character and a third character Wang character; 3 different characters appear in the second video to be processed, namely a first character, a second character and a fourth character; if two characters appear in the third video to be processed, namely two characters and one character 2, the first video to be processed and the second video to be processed can be stored in the same file or directory, and the first type video with the character Lidi can be obtained.
And S150, sequencing the first type of videos according to a video playing rule to obtain the similar videos.
Specifically, in order to watch videos of the same person conveniently, the videos of the first category can be sorted according to the video playing rules, and when a user wants to watch videos of a certain specific person, the user only needs to click once to play, so that all videos of the specific person can be played according to a certain sequence.
Wherein, the video playing rule comprises: and playing and sequencing the first type of videos according to the sequence of the shooting time of the videos to be processed. Or the video playing rule can be changed into the following rule according to the habit of the user: playing and sequencing are carried out according to the length of the video playing time in the first category of videos, and the like, the video playing sequence rule is not particularly limited, and the corresponding adjustment can be carried out according to the needs of users.
In order to facilitate searching for videos of specific people, after the first-class videos are sorted according to a video playing rule to obtain the videos of the same class, the video classification based on face recognition further comprises:
acquiring a face image corresponding to a common single face code in the same type of video as an identification image;
and taking the identification image as a catalogue cover of the similar video, wherein the similar video is matched with the corresponding catalogue.
Further, in order to facilitate searching for videos of specific people, after the first-class videos are sorted according to a video playing rule to obtain the similar videos, the video classification based on face recognition further includes:
and using the common single face code of the same type of videos as the directory name of the same type of videos.
The video classification method based on face recognition is applied to an electronic device 1. Fig. 2 is a schematic diagram of an application environment of a video classification method based on face recognition according to a preferred embodiment of the present invention.
In the present embodiment, the electronic device 1 may be a terminal device having an arithmetic function, such as a server, a smart phone, a tablet computer, a portable computer, or a desktop computer.
The electronic device 1 includes: a processor 12, a memory 11, a network interface 13, and a communication bus 14.
The memory 11 includes at least one type of readable storage medium. The at least one type of readable storage medium may be a non-volatile storage medium such as a flash memory, a hard disk, a multimedia card, a card-type memory 11, and the like. In some embodiments, the readable storage medium may be an internal storage unit of the electronic apparatus 1, such as a hard disk of the electronic apparatus 1. In other embodiments, the readable storage medium may also be an external memory 11 of the electronic device 1, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a flash Card (FlashCard), and the like provided on the electronic device 1.
In the present embodiment, the readable storage medium of the memory 11 is generally used for storing the video classification program 10 based on face recognition installed in the electronic device 1, and the like. The memory 11 may also be used to temporarily store data that has been output or is to be output.
The network interface 13 may optionally comprise a standard wired interface, a wireless interface (e.g. WI-FI interface), typically used for establishing a communication connection between the electronic apparatus 1 and other electronic devices.
The communication bus 14 is used to realize connection communication between these components.
Fig. 2 only shows the electronic device 1 with components 11-14, but it is to be understood that not all of the shown components are required to be implemented, and that more or fewer components may alternatively be implemented.
Alternatively, the electronic device 1 may further include an image capturing device, which may be a part of the electronic device 1 or may be independent of the electronic device 1. In some embodiments, the electronic apparatus 1 is a terminal device having a camera, such as a smart phone, a tablet computer, a portable computer, or the like, and the camera is the camera of the electronic apparatus 1. In other embodiments, the electronic device 1 may be a server, and the image capturing device is independent of the electronic device 1 and connected to the electronic device 1 through a wired or wireless network. For example, the image capturing apparatus is installed in a specific location, such as an office or a monitoring area, captures a real-time image of a target entering the specific location in real time, and transmits the captured real-time image to the processor 12 through a network.
Optionally, the electronic device 1 may further include a user interface, the user interface may include an input unit such as a Keyboard (Keyboard), a voice input device such as a microphone (microphone) or other equipment with a voice recognition function, a voice output device such as a sound box, a headset, etc., and optionally the user interface may further include a standard wired interface, a wireless interface.
Optionally, the electronic device 1 may further comprise a display, which may also be referred to as a display screen or a display unit. In some embodiments, the display device may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an Organic Light-Emitting Diode (OLED) touch device, or the like. The display is used for displaying information processed in the electronic apparatus 1 and for displaying a visualized user interface.
Optionally, the electronic device 1 further comprises a touch sensor. The area provided by the touch sensor for the user to perform touch operation is referred to as a touch area. Further, the touch sensor here may be a resistive touch sensor, a capacitive touch sensor, or the like. The touch sensor may include not only a contact type touch sensor but also a proximity type touch sensor. Further, the touch sensor may be a single sensor, or may be a plurality of sensors arranged in an array, for example.
The area of the display of the electronic device 1 may be the same as or different from the area of the touch sensor. Optionally, a display is stacked with the touch sensor to form a touch display screen. The device detects touch operation triggered by a user based on the touch display screen.
Optionally, the electronic device 1 may further include a Radio Frequency (RF) circuit, a sensor, an audio circuit, and the like, which are not described herein again.
In the embodiment of the apparatus shown in fig. 2, the memory 11, which is a kind of computer storage medium, may include therein an operating system and a video classification program 10 based on face recognition; the processor 12, when executing the face recognition based video classification program 10 stored in the memory 11, implements the following steps:
step S110, extracting a face image of a video to be processed according to a video classification instruction;
step S120, inputting the face image into a preset face coding model to obtain a face code;
step S130, merging the same face codes in the video to be processed to obtain a single face code;
step S140, classifying the videos to be processed with the same single face code to obtain a first class video;
and S150, sequencing the first type of videos according to a video playing rule to obtain the similar videos.
In order to obtain a video image with a human face, as a preferred embodiment of the present invention, extracting a human face image of a video to be processed according to a video classification instruction includes:
carrying out image extraction processing on a video to be processed according to a preset extraction frequency to obtain a video image;
and carrying out face screening processing on the video image to obtain a face image.
In order to facilitate obtaining the face code, as a preferred embodiment of the present invention, before the face image is input into a preset face coding model and the face code is obtained, the video classification based on face recognition further includes:
collecting a face image sample and matching face codes for the face image sample;
extracting feature data of the face image sample, and establishing a corresponding relation between the feature data of the face image sample and face codes;
and establishing a basic model, training the basic model according to the corresponding relation between the feature data of the face image sample and the face code, and generating a preset face code model.
As a preferred embodiment of the present invention, inputting a face image into a preset face coding model, and obtaining a face code includes:
preprocessing the face image to obtain a clear face video image, wherein the preprocessing comprises the following steps: image sharpening, background removal, geometric normalization and gray level normalization;
carrying out face feature extraction processing on the clear face video image to obtain face feature data;
comparing the face characteristic data with face image sample characteristic data in the preset face coding model to obtain most similar face image sample characteristic data;
and outputting the face code corresponding to the most similar face image sample characteristic data according to the most similar face image sample characteristic data.
In order to avoid repetition of face coding, as a preferred embodiment of the present invention, merging the same face codes in the video to be processed to obtain a single face code includes:
screening the face codes in the video to be processed to screen out the same face codes;
and merging the same face codes to obtain a single face code.
As a preferred embodiment of the present invention, the video playing rule includes: and playing and sequencing the first type of videos according to the sequence of the shooting time of the videos to be processed.
In order to facilitate searching for a video of a specific person, as a preferred embodiment of the present invention, after the first class of videos are sorted according to a video playing rule to obtain the same class of videos, the video classification based on face recognition further includes:
acquiring a face image corresponding to a common single face code in the same type of video as an identification image;
and taking the identification image as a catalogue cover of the similar video, wherein the similar video is matched with the corresponding catalogue.
In order to facilitate searching for a video of a specific person, as a preferred embodiment of the present invention, after the first class of videos are sorted according to a video playing rule to obtain the same class of videos, the video classification based on face recognition further includes:
and using the common single face code of the same type of videos as the directory name of the same type of videos.
In other embodiments, the video classification program 10 based on face recognition may also be divided into one or more modules, which are stored in the memory 11 and executed by the processor 12 to accomplish the present invention.
The modules referred to herein are referred to as a series of computer program instruction segments capable of performing specified functions. Referring to fig. 3, a block diagram of a preferred embodiment of the video classification process 10 based on face recognition in fig. 2 is shown. The face recognition based video classification program 10 may be segmented into: the system comprises a face image extraction module 110, a face coding module 120, a same face coding and merging module 130, a video classification module 140 and a video playing and sorting module 150. The functions or operation steps implemented by the module 110-150 are similar to those described above, and are not described in detail here, for example, where:
the face image extraction module 110: and the face image extraction module is used for extracting the face image of the video to be processed according to the video classification instruction.
The face encoding module 120: the face coding method is used for inputting the face image into a preset face coding model to obtain the face code.
The same face code merging module 130: the method is used for merging the same face codes in the video to be processed to obtain a single face code.
The video classification module 140: the method is used for classifying the videos to be processed with the same single face code to obtain a first-class video.
The video play sequencing module 150: the method is used for sequencing the first type of videos according to the video playing rule to obtain the similar videos.
As shown in fig. 4, in addition, corresponding to the above method, an embodiment of the present invention further provides a video classification system 400 based on face recognition, including: the video classification method comprises a face image extraction unit 410, a face coding unit 420, a same face coding and merging unit 430, a video classification unit 440 and a video playing and sorting unit 450, wherein the implementation functions of the face image extraction unit 410, the face coding unit 420, the same face coding and merging unit 430, the video classification unit 440 and the video playing and sorting unit 450 correspond to the steps of the video classification method based on face recognition in the embodiment in a one-to-one manner.
Face image extraction unit 110: and the face image extraction module is used for extracting the face image of the video to be processed according to the video classification instruction.
The face encoding unit 120: the face coding method is used for inputting the face image into a preset face coding model to obtain the face code.
The same face coding merging unit 130: the method is used for merging the same face codes in the video to be processed to obtain a single face code.
The video classification unit 140: the method is used for classifying the videos to be processed with the same single face code to obtain a first-class video.
Video playback sorting unit 150: the method is used for sequencing the first type of videos according to the video playing rule to obtain the similar videos.
Furthermore, an embodiment of the present invention further provides a computer-readable storage medium, in which a video classification program based on face recognition is stored, and when executed by a processor, the video classification program based on face recognition implements the following operations:
extracting a face image of a video to be processed according to the video classification instruction;
inputting the face image into a preset face coding model to obtain a face code;
merging the same face codes in the video to be processed to obtain a single face code;
classifying the videos to be processed with the same single face code to obtain a first class video;
and sequencing the first type of videos according to a video playing rule to obtain the similar videos.
Preferably, the extracting the face image of the video to be processed according to the video classification instruction comprises:
carrying out image extraction processing on a video to be processed according to a preset extraction frequency to obtain a video image;
and carrying out face screening processing on the video image to obtain a face image.
Preferably, before the face image is input into the preset face coding model and the face coding is obtained, the video classification based on the face recognition further includes:
collecting a face image sample and matching face codes for the face image sample;
extracting feature data of the face image sample, and establishing a corresponding relation between the feature data of the face image sample and face codes;
and establishing a basic model, training the basic model according to the corresponding relation between the feature data of the face image sample and the face code, and generating a preset face code model.
Preferably, the step of inputting the face image into a preset face coding model to obtain the face code comprises:
preprocessing the face image to obtain a clear face video image, wherein the preprocessing comprises the following steps: image sharpening, background removal, geometric normalization and gray level normalization;
carrying out face feature extraction processing on the clear face video image to obtain face feature data;
comparing the face characteristic data with face image sample characteristic data in the preset face coding model to obtain most similar face image sample characteristic data;
and outputting the face code corresponding to the most similar face image sample characteristic data according to the most similar face image sample characteristic data.
Preferably, the merging the same face codes in the video to be processed to obtain a single face code includes:
screening the face codes in the video to be processed to screen out the same face codes;
and merging the same face codes to obtain a single face code.
Preferably, the video playing rules include: and playing and sequencing the first type of videos according to the sequence of the shooting time of the videos to be processed.
Preferably, after the first class of videos are sorted according to the video playing rule to obtain the similar videos, the video classification based on face recognition further includes:
acquiring a face image corresponding to a common single face code in the same type of video as an identification image;
and taking the identification image as a catalogue cover of the similar video, wherein the similar video is matched with the corresponding catalogue.
Preferably, after the first class of videos are sorted according to the video playing rule to obtain the similar videos, the video classification based on face recognition further includes:
and using the common single face code of the same type of videos as the directory name of the same type of videos.
The specific implementation of the computer-readable storage medium of the present invention is substantially the same as the above-mentioned video classification method based on face recognition and the specific implementation of the electronic device, and will not be described herein again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, apparatus, article, or method. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, apparatus, article, or method that includes the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments. Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.
Claims (10)
1. A video classification method based on face recognition is applied to an electronic device, and is characterized by comprising the following steps:
extracting a face image of a video to be processed according to the video classification instruction;
inputting the face image into a preset face coding model to obtain a face code;
merging the same face codes in the video to be processed to obtain a single face code;
classifying the videos to be processed with the same single face code to obtain a first class video;
and sequencing the first type of videos according to a video playing rule to obtain the similar videos.
2. The video classification method based on face recognition according to claim 1, wherein the extracting the face image of the video to be processed according to the video classification instruction comprises:
carrying out image extraction processing on the video to be processed according to a preset extraction frequency to obtain a video image;
and carrying out face screening processing on the video image to obtain a face image.
3. The method for video classification based on face recognition according to claim 1, wherein before the face image is input into a preset face coding model to obtain the face code, the video classification based on face recognition further comprises:
collecting a face image sample, and matching face codes for the face image sample;
extracting the feature data of the face image sample, and establishing the corresponding relation between the feature data of the face image sample and the face code;
and establishing a basic model, training the basic model according to the corresponding relation between the feature data of the face image sample and the face code, and generating a preset face code model.
4. The video classification method based on face recognition according to claim 3, wherein the step of inputting the face image into a preset face coding model to obtain the face code comprises:
preprocessing the face image to obtain a clear face video image, wherein the preprocessing comprises the following steps: image sharpening, background removal, geometric normalization and gray level normalization;
carrying out face feature extraction processing on the clear face video image to obtain face feature data;
comparing the face feature data with face image sample feature data in the preset face coding model to obtain most similar face image sample feature data;
and outputting the face code corresponding to the most similar face image sample characteristic data according to the most similar face image sample characteristic data.
5. The video classification method based on face recognition according to claim 1, wherein merging the same face codes in the video to be processed to obtain a single face code comprises:
screening the face codes in the video to be processed to screen out the same face codes;
and merging the same face codes to obtain a single face code.
6. The video classification method based on face recognition according to claim 1, wherein the video playing rule comprises: and playing and sequencing the first type of videos according to the sequence of the shooting time of the videos to be processed.
7. The video classification method based on face recognition according to claim 1, wherein after the first class of video is sorted according to a video playing rule to obtain the same class of video, the video classification based on face recognition further comprises:
acquiring a face image corresponding to a common single face code in the same type of video as an identification image;
and taking the identification image as a catalogue cover of the similar video, wherein the similar video is matched with a corresponding catalogue.
8. The video classification method based on face recognition according to claim 1, wherein after the first class of video is sorted according to a video playing rule to obtain the same class of video, the video classification based on face recognition further comprises:
and using the common single face code of the similar videos as the directory name of the similar videos.
9. An electronic device, comprising: the video classification program based on the face recognition is stored in the memory and is executed by the processor to realize the following steps:
extracting a face image of a video to be processed according to the video classification instruction;
inputting the face image into a preset face coding model to obtain a face code;
merging the same face codes in the video to be processed to obtain a single face code;
classifying the videos to be processed with the same single face code to obtain a first class video;
and sequencing the first type of videos according to a video playing rule to obtain the similar videos.
10. A computer-readable storage medium, wherein a video classification program based on face recognition is stored in the computer-readable storage medium, and when the video classification program based on face recognition is executed by a processor, the steps of the video classification method based on face recognition according to any one of claims 1 to 8 are implemented.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010237343.5A CN111553191A (en) | 2020-03-30 | 2020-03-30 | Video classification method and device based on face recognition and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010237343.5A CN111553191A (en) | 2020-03-30 | 2020-03-30 | Video classification method and device based on face recognition and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111553191A true CN111553191A (en) | 2020-08-18 |
Family
ID=72005543
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010237343.5A Pending CN111553191A (en) | 2020-03-30 | 2020-03-30 | Video classification method and device based on face recognition and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111553191A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112949430A (en) * | 2021-02-07 | 2021-06-11 | 北京有竹居网络技术有限公司 | Video processing method and device, storage medium and electronic equipment |
CN113052116A (en) * | 2021-04-06 | 2021-06-29 | 深圳华声医疗技术股份有限公司 | Ultrasonic video data processing method and device, ultrasonic equipment and storage medium |
CN113852792A (en) * | 2021-09-18 | 2021-12-28 | 杭州禹疆智能科技有限公司 | Artificial intelligence based monitoring system and monitoring method |
Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103093213A (en) * | 2013-01-28 | 2013-05-08 | 广东欧珀移动通信有限公司 | Video file classification method and terminal |
CN103530652A (en) * | 2013-10-23 | 2014-01-22 | 北京中视广信科技有限公司 | Face clustering based video categorization method and retrieval method as well as systems thereof |
US20140375886A1 (en) * | 2013-06-19 | 2014-12-25 | Set Media, Inc. | Automatic face discovery and recognition for video content analysis |
CN105426515A (en) * | 2015-12-01 | 2016-03-23 | 小米科技有限责任公司 | Video classification method and apparatus |
CN106559654A (en) * | 2016-11-18 | 2017-04-05 | 广州炫智电子科技有限公司 | A kind of recognition of face monitoring collection system and its control method |
CN107844744A (en) * | 2017-10-09 | 2018-03-27 | 平安科技(深圳)有限公司 | With reference to the face identification method, device and storage medium of depth information |
CN108090497A (en) * | 2017-12-28 | 2018-05-29 | 广东欧珀移动通信有限公司 | Video classification methods, device, storage medium and electronic equipment |
CN109670486A (en) * | 2019-01-30 | 2019-04-23 | 深圳前海达闼云端智能科技有限公司 | A kind of face identification method based on video, device and calculate equipment |
CN109766765A (en) * | 2018-12-18 | 2019-05-17 | 深圳壹账通智能科技有限公司 | Audio data method for pushing, device, computer equipment and storage medium |
CN110059625A (en) * | 2019-04-18 | 2019-07-26 | 重庆大学 | A kind of face training and recognition methods based on mixup |
CN110347876A (en) * | 2019-07-12 | 2019-10-18 | Oppo广东移动通信有限公司 | Video classification methods, device, terminal device and computer readable storage medium |
-
2020
- 2020-03-30 CN CN202010237343.5A patent/CN111553191A/en active Pending
Patent Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103093213A (en) * | 2013-01-28 | 2013-05-08 | 广东欧珀移动通信有限公司 | Video file classification method and terminal |
US20140375886A1 (en) * | 2013-06-19 | 2014-12-25 | Set Media, Inc. | Automatic face discovery and recognition for video content analysis |
CN103530652A (en) * | 2013-10-23 | 2014-01-22 | 北京中视广信科技有限公司 | Face clustering based video categorization method and retrieval method as well as systems thereof |
CN105426515A (en) * | 2015-12-01 | 2016-03-23 | 小米科技有限责任公司 | Video classification method and apparatus |
CN106559654A (en) * | 2016-11-18 | 2017-04-05 | 广州炫智电子科技有限公司 | A kind of recognition of face monitoring collection system and its control method |
CN107844744A (en) * | 2017-10-09 | 2018-03-27 | 平安科技(深圳)有限公司 | With reference to the face identification method, device and storage medium of depth information |
CN108090497A (en) * | 2017-12-28 | 2018-05-29 | 广东欧珀移动通信有限公司 | Video classification methods, device, storage medium and electronic equipment |
CN109766765A (en) * | 2018-12-18 | 2019-05-17 | 深圳壹账通智能科技有限公司 | Audio data method for pushing, device, computer equipment and storage medium |
CN109670486A (en) * | 2019-01-30 | 2019-04-23 | 深圳前海达闼云端智能科技有限公司 | A kind of face identification method based on video, device and calculate equipment |
CN110059625A (en) * | 2019-04-18 | 2019-07-26 | 重庆大学 | A kind of face training and recognition methods based on mixup |
CN110347876A (en) * | 2019-07-12 | 2019-10-18 | Oppo广东移动通信有限公司 | Video classification methods, device, terminal device and computer readable storage medium |
Non-Patent Citations (1)
Title |
---|
杨帆编著: "《数字图像处理与分析》", 北京:北京航空航天大学出版社, pages: 307 - 308 * |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112949430A (en) * | 2021-02-07 | 2021-06-11 | 北京有竹居网络技术有限公司 | Video processing method and device, storage medium and electronic equipment |
CN113052116A (en) * | 2021-04-06 | 2021-06-29 | 深圳华声医疗技术股份有限公司 | Ultrasonic video data processing method and device, ultrasonic equipment and storage medium |
CN113052116B (en) * | 2021-04-06 | 2022-02-22 | 深圳华声医疗技术股份有限公司 | Ultrasonic video data processing method and device, ultrasonic equipment and storage medium |
CN113852792A (en) * | 2021-09-18 | 2021-12-28 | 杭州禹疆智能科技有限公司 | Artificial intelligence based monitoring system and monitoring method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108038414B (en) | Character analysis method, device and storage medium based on cyclic neural network | |
CN106446816B (en) | Face recognition method and device | |
CN106326391B (en) | Multimedia resource recommendation method and device | |
CN111553191A (en) | Video classification method and device based on face recognition and storage medium | |
WO2017045443A1 (en) | Image retrieval method and system | |
CN110246512A (en) | Sound separation method, device and computer readable storage medium | |
CN107871001B (en) | Audio playing method and device, storage medium and electronic equipment | |
CN106156347A (en) | Cloud photograph album classification methods of exhibiting, device and server | |
CA2623493A1 (en) | System and method for image processing | |
US10380267B2 (en) | System and method for tagging multimedia content elements | |
CN103488528A (en) | QR code processing method and device based on mobile terminals | |
CN107943811B (en) | Content publishing method and device | |
CN111209490A (en) | Friend-making recommendation method based on user information, electronic device and storage medium | |
CN106156794B (en) | Character recognition method and device based on character style recognition | |
CN113704184A (en) | File classification method, device, medium and equipment | |
CN111191207A (en) | Electronic file control method and device, computer equipment and storage medium | |
CN114372172A (en) | Method and device for generating video cover image, computer equipment and storage medium | |
CN112052784A (en) | Article searching method, device, equipment and computer readable storage medium | |
KR20210086836A (en) | Image data processing method for searching images by text | |
KR101429882B1 (en) | Image Processor, Image Processing Method, Control Program, and Recording Medium | |
CN110717060A (en) | Image mask filtering method and device and storage medium | |
CN113869063A (en) | Data recommendation method and device, electronic equipment and storage medium | |
CN103716685A (en) | Icon recognition system, server and method | |
US9141850B2 (en) | Electronic device and photo management method thereof | |
CN112992152B (en) | Individual-soldier voiceprint recognition system and method, storage medium and electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WD01 | Invention patent application deemed withdrawn after publication | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20200818 |