CN113449542B - Face-changing identification method, device, equipment and medium - Google Patents

Face-changing identification method, device, equipment and medium Download PDF

Info

Publication number
CN113449542B
CN113449542B CN202010213408.2A CN202010213408A CN113449542B CN 113449542 B CN113449542 B CN 113449542B CN 202010213408 A CN202010213408 A CN 202010213408A CN 113449542 B CN113449542 B CN 113449542B
Authority
CN
China
Prior art keywords
face
information
original
recognized
face 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.)
Active
Application number
CN202010213408.2A
Other languages
Chinese (zh)
Other versions
CN113449542A (en
Inventor
李振
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Uniview Technologies Co Ltd
Original Assignee
Zhejiang Uniview Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Uniview Technologies Co Ltd filed Critical Zhejiang Uniview Technologies Co Ltd
Priority to CN202010213408.2A priority Critical patent/CN113449542B/en
Publication of CN113449542A publication Critical patent/CN113449542A/en
Application granted granted Critical
Publication of CN113449542B publication Critical patent/CN113449542B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Collating Specific Patterns (AREA)

Abstract

The invention discloses a face-changing identification method, a face-changing identification device, face-changing identification equipment and a face-changing identification medium. Wherein the method comprises the following steps: acquiring face information to be recognized of a first key frame in a first standard code stream file, wherein the first standard code stream file carries preset video information, and the preset video information records original face information corresponding to each key frame in the first standard code stream file; extracting first original face information corresponding to the first key frame from the preset video information; and identifying whether the first standard code stream file is subjected to face changing processing or not according to the coincidence degree between the face information to be identified and the first original face information. According to the technical scheme provided by the invention, the face changing process is identified according to the contact ratio between the face information, and the identification efficiency and the identification precision of face changing identification can be improved.

Description

Face changing identification method, device, equipment and medium
Technical Field
The embodiment of the invention relates to the technical field of face recognition, in particular to a face changing recognition method, a face changing recognition device, face changing recognition equipment and a face changing recognition medium.
Background
With the development of face recognition technology, a plurality of video face changing technologies gradually appear, the technology can modify face images in videos, and once the technologies are improperly used, data can be maliciously modified, so that laws are violated, and serious social influences are generated.
In the prior art, face change recognition is usually performed by collecting "anti-physiological" features of a human face, for example, whether the human face is changed is determined by determining whether the proportion of the head of a person in an image meets a normal proportion. However, with the maturity of face changing technology and the situation that only a part of face changing exists in the face of some videos, the prior art cannot meet the identification requirement of the current face changing, and has the problems of low identification rate and incapability of accurately determining the specific position of the face changing.
Disclosure of Invention
The invention provides a face-changing identification method, a face-changing identification device, face-changing identification equipment and a face-changing identification medium, which are used for improving the identification rate and the identification precision of face-changing identification.
In a first aspect, an embodiment of the present invention provides a face-changing identification method, where the method includes: acquiring face information to be recognized of a first key frame in a first standard code stream file, wherein the first standard code stream file carries preset video information, and the preset video information records original face information corresponding to each key frame in the first standard code stream file;
acquiring first original face information corresponding to the first key frame from the preset video information;
and identifying whether the first standard code stream file is subjected to face changing processing or not according to the coincidence degree between the face information to be identified and the first original face information.
In a second aspect, an embodiment of the present invention further provides a face-changing recognition apparatus, where the apparatus includes:
the system comprises a to-be-recognized face information acquisition module, a face recognition module and a face recognition module, wherein the to-be-recognized face information of a first key frame in a first standard code stream file is acquired, the first standard code stream file carries preset video information, and the preset video information records original face information corresponding to each key frame in the first standard code stream file;
the original face information extraction module is used for extracting first original face information corresponding to the first key frame from the preset video information;
and the identification module is used for identifying whether the first standard code stream file is subjected to face changing processing or not according to the contact ratio between the face information to be identified and the first original face information.
In a third aspect, an embodiment of the present invention further provides an apparatus, where the apparatus includes:
one or more processors;
a storage device to store one or more programs,
when executed by the one or more processors, cause the one or more processors to implement a face recognition method according to any one of the embodiments of the present invention.
In a fourth aspect, the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements a face-changing identification method according to any one of the embodiments of the present invention.
The face change recognition scheme provided by the embodiment of the invention is characterized in that face information to be recognized of a first key frame in a first standard code stream file is collected, first original face information corresponding to the first key frame in preset video information is extracted, and whether the first standard code stream file is subjected to face change processing is recognized according to the contact ratio between the face information to be recognized and the first original face information, wherein the preset video information is stored in the first standard code stream file, and the preset video information records the original face information corresponding to each key frame in the first standard code stream file. Compared with the scheme in the prior art, the face changing recognition method and the face changing recognition device can improve the recognition efficiency and recognition accuracy of the face changing recognition.
Drawings
Fig. 1 is a flowchart of a face-changing identification method according to an embodiment of the present invention;
fig. 2 is a flowchart of another face-changing identification method according to an embodiment of the present invention;
fig. 3 is a schematic diagram of face position information according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a face-changing recognition apparatus according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an apparatus according to an embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not to be construed as limiting the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Fig. 1 is a flowchart of face-changing recognition according to an embodiment of the present invention, where the embodiment is applicable to a case of recognizing a face-changing process in a video, and the method may be executed by a face-changing recognition apparatus, where the apparatus may be implemented by software and/or hardware, and may be integrated in an electronic device.
Referring to fig. 1, the method specifically includes the following steps:
s110, acquiring face information to be recognized of a first key frame in a first standard code stream file, wherein the first standard code stream file carries preset video information, and the preset video information records original face information corresponding to each key frame in the first standard code stream file.
The first standard code stream file is any standard code stream file carrying preset video information and comprises a plurality of key frames, and the first key frame can be any key frame in the first standard code stream file.
The preset video information can be acquired from an original standard code stream file in advance, wherein the original standard code stream file is original data information acquired directly through equipment. For example, the original standard code stream file may be original data information directly captured by the monitoring device. The method comprises the steps of collecting original face information from each key frame in an original standard code stream file in advance, storing the collected original face information as preset video information, and combining the preset video information on the basis of the original standard code stream file to obtain a first standard code stream file. The original face information of each key frame in the preset video information corresponds to the face information to be recognized of each key frame in the first standard code stream file.
Optionally, the first standard code stream file is a file in an h.264 standard code stream format, the preset video information is contained in the self-defined information field SEI, and data information stored in the file in the h.264 standard code stream format is not encrypted and is not damaged, so that the method is suitable for any standard and general environment, and the universality of the method is ensured.
Illustratively, for an original standard code stream file directly acquired by a section of monitoring camera, original face information in each key frame in the original standard code stream file is acquired respectively through a face recognition algorithm, and the acquired original face information is stored as preset video information, so as to generate a first standard code stream file carrying the preset video information. When it is required to identify whether a first key frame in the first standard code stream file is subjected to face changing processing, face information to be identified of the first key frame in the first standard code stream file is acquired by using a face identification algorithm, wherein the first key frame can be any key frame in the first standard code stream file.
And S120, extracting first original face information corresponding to the first key frame from the preset video information.
The first original face information and the face information to be recognized may include at least one region position information of the face key region. The face key region may include region position information of at least one of eyebrows, eyes, a nose and a mouth, and the first original face information and the face information to be recognized include position information at the same position.
Illustratively, if the first key frame is a key frame acquired at a first time in the first standard code stream file, the first original face information corresponding to the first key frame is the face information of the key frame acquired at the first time in the preset video information; if the first original face information includes the position information of the eyebrows and the eyes, the face information to be recognized also includes the position information of the eyebrows and the eyes correspondingly.
S130, identifying whether the first standard code stream file is subjected to face changing processing or not according to the coincidence degree between the face information to be identified and the first original face information.
In this embodiment, the face information to be recognized of each key frame in the first standard code stream file may be respectively compared with the original face information of each key frame in the preset video information, so as to determine whether the first standard code stream file is subjected to face changing processing.
Specifically, identifying whether the first standard code stream file is subjected to face changing processing according to the contact ratio between the face information to be identified and the first original face information includes: and if the contact ratio between the face information to be recognized and the regional position information at any corresponding position of the first original face information does not meet the contact ratio threshold value, performing face changing processing on the first standard code stream file.
Optionally, when only a first standard code stream file at some time needs to be identified whether face exchange processing is performed, face information to be identified of a key frame in the first standard code stream file corresponding to the time and corresponding original face information in preset video information at the time can be correspondingly collected, whether the first standard code stream file is subjected to face exchange is identified by judging the coincidence degree of corresponding positions of the first standard code stream file and the first standard code stream file, that is, if the coincidence degree of area position information at any corresponding position of the first standard code stream file and the first standard code stream file does not meet the coincidence degree threshold, it can be judged that the first standard code stream file is subjected to face exchange operation.
For example, if the face information to be recognized and the first original face information both include position information of eyebrows, eyes, a nose, and a mouth, the coincidence degree between corresponding positions may be compared, and if the coincidence degree does not satisfy the coincidence degree threshold, it may be determined that the first standard code stream file is subjected to a face changing operation. Specifically, the coincidence degree of the curve can be judged by respectively establishing curve equations at different positions in the face information to be recognized and the first original face information and by bringing the curve equations into the coordinate information at the corresponding positions in the first original face information, and if the coincidence degree of the curve at the corresponding position does not meet the coincidence degree threshold value, the first standard code stream file can be judged to be subjected to face changing processing; whether the first standard code stream file is subjected to face changing processing or not can be identified by respectively establishing linear equations between different positions in the face information to be identified and the first original face information and comparing slopes between the linear equations, and specifically, if the slopes of the linear equations at corresponding positions are not equal, it can be judged that the first standard code stream file is subjected to face changing processing.
According to the technical scheme of the embodiment, whether the first standard code stream file is subjected to face changing processing is identified by collecting the face information to be identified of a first key frame in the first standard code stream file, extracting first original face information corresponding to the first key frame in preset video information, and further according to the coincidence degree between the face information to be identified and the first original face information, wherein the preset video information is stored in the first standard code stream file, and the original face information corresponding to each key frame in the first standard code stream file is recorded in the preset video information. Compared with the scheme in the prior art, the face changing recognition method and the face changing recognition device can improve the recognition efficiency and recognition accuracy of the face changing recognition.
Fig. 2 is a flowchart of another face change recognition method according to an embodiment of the present invention, where this embodiment further refines S130 on the basis of the foregoing optional embodiments, and further identifies the face change position in the first key frame according to the overlap ratio between the face information to be recognized and the first original face information, so as to obtain a more accurate face change recognition result. Referring to fig. 2, the method specifically includes:
s210, face information to be recognized of a first key frame in a first standard code stream file is collected, wherein the first standard code stream file carries preset video information, and original face information corresponding to each key frame in the first standard code stream file is recorded in the preset video information.
S220, extracting first original face information corresponding to the first key frame from the preset video information.
And S230, identifying the face changing position in the first key frame according to the coincidence degree between the face information to be identified and the first original face information.
In this embodiment, the face change position in the first key frame is identified according to the coincidence degrees of different positions between the face information to be identified and the first original face information.
Specifically, as an optional implementation manner, the identifying, according to a coincidence degree between the face information to be identified and the first original face information, a face change position in the first key frame includes: determining original curve equations at different positions based on a Newton difference method according to regional position information contained in the first original face information; determining curve equations to be recognized at different positions based on a Newton difference method according to regional position information contained in the face information to be recognized; and respectively substituting the area coordinate information at different positions contained in the first original face information into an original curve equation and a curve equation to be recognized at corresponding positions, wherein if the number of differences between the original curve equation and the curve equation to be recognized, which are zero, is less than a set threshold value, the face at the corresponding position in the first key frame is replaced.
For example, referring to fig. 3, the face information to be recognized and the face information acquired by the first original face information respectively correspond to the following: collecting 100 points according to two closed curves according to the position information of the eyes; acquiring position information of eyebrows, and acquiring 50 coordinate points according to a curve; collecting 100 coordinate points according to two closed curves according to the position information of the mouth; the nose center coordinate point and the two eye center coordinate points are connected to form a triangle.
Taking the determination of whether the eyebrow position in the first key frame is subjected to face replacement processing as an example, the curve equation f to be recognized at the eyebrow position can be obtained by using the newton difference method according to 50 coordinate points at the eyebrow position included in the face information to be recognized and 50 coordinate points at the eyebrow position included in the first original face information 1 (x) And original linear equation f 2 (x) Subtracting the two equations to obtain F (x) = F 1 (x)-f 2 (x) Substituting x-axis coordinates of 50 coordinate points at the eyebrows in the first face information into F (x) = F 1 (x)-f 2 (x) And calculating the contact ratio between the face information to be recognized and the original first face information according to the number of zero in the formula. Specifically, if the result is not zero, it indicates that the eyebrow is replaced.
As another alternative, the face-changing position in the first keyframe may be identified by calculating the slope of a straight line between different positions and the area enclosed by the connecting lines of different positions. Specifically, the recognizing the face change position in the first key frame according to the coincidence ratio between the face information to be recognized and the first original face information includes: establishing an original linear equation between different positions according to regional position information contained in the first original face information; establishing a linear equation to be recognized among different positions according to regional position information contained in the face information to be recognized; and determining the face changing position in the first key frame according to the coincidence degree between the original linear equation and the linear equation to be recognized.
Determining a face-changing position in the first keyframe according to the coincidence degree between the original linear equation and the linear equation to be identified, including: and if the slopes of the original linear equation at the corresponding position and the linear equation to be recognized are not equal, replacing the face at the corresponding position in the first key frame. If the slopes of the original linear equation and the linear equation to be recognized at the corresponding positions are equal, whether the area of a polygon enclosed by the original linear equation is equal to the area of a polygon enclosed by the linear equation to be recognized is continuously determined, and if not, the face at the corresponding position in the first keyframe is replaced.
For example, with reference to fig. 3, three original linear equations and three linear equations to be recognized shown in fig. 3 may be respectively calculated according to the first original face information and the nose center coordinate point and the two eye center coordinate points included in the face information to be recognized, and whether slopes between the original linear equations and the corresponding linear equations to be recognized are the same may be respectively determined, so as to determine whether the face at the corresponding position in the first keyframe has been replaced. For example, if the slope of the line between the two eyes is different, it can be determined that the eye in the first keyframe has been replaced.
If the slopes of the three corresponding linear equations to be recognized and the original linear equation are the same, whether the area of a polygon enclosed by the original linear equation is equal to the area of the polygon enclosed by the linear equation to be recognized or not is continuously judged, and if not, the eyes or the nose in the first key frame can be judged to be replaced.
In this embodiment, the two embodiments described above may be used in combination, and after the identification is performed by using the first embodiment, the verification may be performed by using the second embodiment; it is also possible to carry out the verification and the precise positioning of the replacement position by means of the first embodiment after the identification by means of the second embodiment. The two embodiments are combined for use, so that the accuracy and precision of face changing identification can be further improved.
According to the technical scheme of the embodiment, the face change position in the first key frame can be identified according to the contact ratio between the face information to be identified and the first original face information, and the identification precision of face change identification is improved.
Fig. 4 is a schematic structural diagram of a face-changing recognition device according to an embodiment of the present invention, where the device can execute any one of the face-changing recognition methods according to the embodiments of the present invention. Referring to fig. 4, the apparatus specifically includes:
the acquisition module 310 is configured to acquire face information to be recognized of a first key frame in a first standard code stream file, where the first standard code stream file carries preset video information, and the preset video information records original face information corresponding to each key frame in the first standard code stream file.
An extracting module 320, configured to extract first original face information corresponding to the first key frame from the preset video information.
The identifying module 330 is configured to identify whether the first standard code stream file is subjected to face changing processing according to a coincidence ratio between the face information to be identified and the first original face information.
The first original face information and the face information to be recognized comprise at least one position information of eyebrows, eyes, a nose and a mouth, and the first original face information and the face information to be recognized comprise position information at the same position.
Optionally, the identification module 330 is specifically configured to: and if the contact ratio between the face information to be recognized and the regional position information at any corresponding position of the first original face information does not meet the contact ratio threshold value, performing face changing processing on the first standard code stream file.
Optionally, the identifying module 330 is further specifically configured to: and identifying the face changing position in the first key frame according to the contact ratio between the face information to be identified and the first original face information.
Optionally, the identifying module 330 is further specifically configured to: determining original curve equations at different positions based on a Newton difference method according to regional position information contained in the first original face information;
determining curve equations to be recognized at different positions based on a Newton difference method according to regional position information contained in the face information to be recognized;
and respectively substituting the area coordinate information at different positions contained in the first original face information into an original curve equation and a curve equation to be recognized at corresponding positions, wherein if the number of differences between the original curve equation and the curve equation to be recognized, which are zero, is less than a set threshold value, the face at the corresponding position in the first key frame is replaced.
Optionally, the identifying module 330 is further specifically configured to: establishing an original linear equation between different positions according to regional position information contained in the first original face information;
establishing a linear equation to be recognized among different positions according to regional position information contained in the face information to be recognized;
and determining the face changing position in the first key frame according to the coincidence degree between the original linear equation and the linear equation to be recognized.
Optionally, the identifying module 330 is further specifically configured to: determining the face-changing position in the first keyframe according to the coincidence degree between the original linear equation and the linear equation to be recognized, including:
and if the slopes of the original linear equation at the corresponding position and the linear equation to be recognized are not equal, replacing the face at the corresponding position in the first key frame.
Optionally, the identifying module 330 is further specifically configured to: if the slopes of the original linear equation and the linear equation to be recognized at the corresponding positions are equal, whether the area of a polygon enclosed by the original linear equation is equal to the area of a polygon enclosed by the linear equation to be recognized is continuously determined, and if not, the face at the corresponding position in the first keyframe is replaced.
The first standard code stream file is a file in an H.264 standard code stream format, and the preset video information is contained in a self-defined information field SEI.
The face-changing identification device provided by the embodiment of the invention can execute the face-changing identification method provided by any embodiment of the invention, has corresponding functional modules and beneficial effects of the execution method, and is not repeated.
Fig. 5 is a schematic structural diagram of an apparatus according to an embodiment of the present invention. Fig. 5 illustrates a block diagram of an exemplary device 12 suitable for use in implementing embodiments of the present invention. The device 12 shown in fig. 5 is only an example and should not bring any limitations to the functionality and scope of use of the embodiments of the present invention.
As shown in FIG. 5, device 12 is in the form of a general purpose computing device. The components of device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that couples various system components including the system memory 28 and the processing unit 16.
Bus 18 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Device 12 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by device 12 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 28 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM) 30 and/or cache memory 32. Device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 5 and commonly referred to as a "hard drive"). Although not shown in FIG. 5, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 by one or more data media interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 42 generally carry out the functions and/or methodologies of the described embodiments of the invention.
Device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), with one or more devices that enable a user to interact with device 12, and/or with any devices (e.g., network card, modem, etc.) that enable device 12 to communicate with one or more other computing devices. Such communication may be through an input/output (I/O) interface 22. Also, the device 12 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network such as the Internet) via the network adapter 20. As shown, the network adapter 20 communicates with the other modules of the device 12 via the bus 18. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processing unit 16 executes various functional applications and data processing by executing programs stored in the system memory 28, for example, to implement a face change recognition method provided by an embodiment of the present invention.
An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements a face-changing identification method according to any one of the embodiments of the present invention, where the method includes:
acquiring face information to be recognized of a first key frame in a first standard code stream file, wherein the first standard code stream file carries preset video information, and the preset video information records original face information corresponding to each key frame in the first standard code stream file;
extracting first original face information corresponding to the first key frame from the preset video information;
and identifying whether the first standard code stream file is subjected to face changing processing or not according to the coincidence degree between the face information to be identified and the first original face information.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (7)

1. A face change recognition method, comprising:
acquiring face information to be recognized of a first key frame in a first standard code stream file, wherein the first standard code stream file carries preset video information, and the preset video information records original face information corresponding to each key frame in the first standard code stream file;
extracting first original face information corresponding to the first key frame from the preset video information;
identifying whether the first standard code stream file is subjected to face changing processing or not according to the coincidence degree between the face information to be identified and the first original face information;
wherein, the recognizing the face-changing position in the first key frame according to the contact ratio between the face information to be recognized and the first original face information comprises:
determining original curve equations at different positions according to regional position information contained in the first original face information;
determining curve equations to be recognized at different positions according to regional position information contained in the face information to be recognized;
respectively substituting the area coordinate information at different positions contained in the first original face information into an original curve equation and a curve equation to be recognized at corresponding positions, wherein if the number of differences between the original curve equation and the curve equation to be recognized, which are zero, is less than a set threshold value, the face at the corresponding position in the first key frame is replaced;
the area location information includes: region position information of eyebrows, region position information of eyes, and region position information of mouths;
acquiring coordinate points of the eye region position information according to a first preset number through two closed curves;
acquiring coordinate points of the area position information of the eyebrows according to a second preset number through a curve to obtain the coordinate points;
and acquiring coordinate points of the region position information of the mouth according to a third preset number through the two closed curves.
2. The method according to claim 1, wherein the first original face information and the face information to be recognized comprise at least one region position information of a face key region, and the first original face information and the face information to be recognized comprise region position information at the same position;
correspondingly, the identifying whether the first standard code stream file is subjected to face changing processing according to the contact ratio between the face information to be identified and the first original face information includes:
and if the contact ratio between the face information to be recognized and the regional position information at any corresponding position of the first original face information does not meet the contact ratio threshold value, performing face changing processing on the first standard code stream file.
3. The method according to any one of claims 1-2, wherein after identifying the face replacement position in the first key frame according to the coincidence ratio between the face information to be identified and the first original face information, the method further comprises:
respectively connecting a nose center coordinate point and two eye center coordinate points contained in the first original face information and the face information to be recognized to respectively obtain three original linear equations corresponding to the first original face information and three linear equations to be recognized corresponding to the face information to be recognized, and respectively judging whether the slopes between the original linear equations and the linear equations to be recognized at the corresponding positions are the same or not;
if the slopes of the original linear equation at the corresponding position and the linear equation to be recognized are not equal, replacing the face at the corresponding position in the first key frame;
if the slopes of the original linear equation and the linear equation to be recognized at the corresponding position are equal, whether the area of a polygon enclosed by the three original linear equations is equal to the area of a polygon enclosed by the three linear equations to be recognized is continuously determined, and if not, the face at the corresponding position in the first keyframe is replaced.
4. The method of claim 1, wherein the first standard code stream file is a file in an H264 standard code stream format, and the predetermined video information is contained in a self-defined information field SEI.
5. A face-changing identification device, the device comprising:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring face information to be identified of a first key frame in a first standard code stream file, the first standard code stream file carries preset video information, and the preset video information records original face information corresponding to each key frame in the first standard code stream file;
the extraction module is used for extracting first original face information corresponding to the first key frame from the preset video information;
the identification module is used for identifying whether the first standard code stream file is subjected to face changing processing or not according to the coincidence degree between the face information to be identified and the first original face information;
wherein, the identification module is specifically configured to: determining original curve equations at different positions according to regional position information contained in the first original face information;
determining curve equations to be recognized at different positions according to regional position information contained in the face information to be recognized;
respectively substituting the area coordinate information at different positions contained in the first original face information into an original curve equation and a curve equation to be recognized at corresponding positions, wherein if the number of differences between the original curve equation and the curve equation to be recognized, which are zero, is less than a set threshold value, the face at the corresponding position in the first key frame is replaced;
the area location information includes: region position information of eyebrows, region position information of eyes, and region position information of mouths;
acquiring coordinate points of the region position information of the eyes according to a first preset number through two closed curves to obtain the coordinate points;
acquiring coordinate points of the area position information of the eyebrows according to a second preset number through a curve to obtain the coordinate points;
and acquiring coordinate points of the region position information of the mouth according to a third preset number through the two closed curves.
6. An apparatus, characterized in that the apparatus comprises:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement a face recognition method as claimed in any one of claims 1-4.
7. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out a face recognition method according to any one of claims 1 to 4.
CN202010213408.2A 2020-03-24 2020-03-24 Face-changing identification method, device, equipment and medium Active CN113449542B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010213408.2A CN113449542B (en) 2020-03-24 2020-03-24 Face-changing identification method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010213408.2A CN113449542B (en) 2020-03-24 2020-03-24 Face-changing identification method, device, equipment and medium

Publications (2)

Publication Number Publication Date
CN113449542A CN113449542A (en) 2021-09-28
CN113449542B true CN113449542B (en) 2023-04-07

Family

ID=77806461

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010213408.2A Active CN113449542B (en) 2020-03-24 2020-03-24 Face-changing identification method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN113449542B (en)

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4320272B2 (en) * 2004-03-31 2009-08-26 富士フイルム株式会社 Specific area detection method, specific area detection apparatus, and program
JP2007233517A (en) * 2006-02-28 2007-09-13 Fujifilm Corp Face detector, detection method and program
CN102831413A (en) * 2012-09-11 2012-12-19 上海中原电子技术工程有限公司 Face identification method and face identification system based on fusion of multiple classifiers
CN106454385B (en) * 2015-08-04 2019-06-25 中国科学院深圳先进技术研究院 Video frame altering detecting method
CN105447480A (en) * 2015-12-30 2016-03-30 吉林纪元时空动漫游戏科技集团股份有限公司 Face recognition game interactive system
CN109712065A (en) * 2017-10-25 2019-05-03 丽宝大数据股份有限公司 Biological information analytical equipment and its shape of face analogy method
CN108040290A (en) * 2017-12-22 2018-05-15 四川长虹电器股份有限公司 TV programme based on AR technologies are changed face method in real time
CN110210393A (en) * 2019-05-31 2019-09-06 百度在线网络技术(北京)有限公司 The detection method and device of facial image
CN110414437A (en) * 2019-07-30 2019-11-05 上海交通大学 Face datection analysis method and system are distorted based on convolutional neural networks Model Fusion
CN110826440B (en) * 2019-10-28 2022-05-24 华南理工大学 Face changing video tampering detection method and system based on eye movement characteristics
CN110880172A (en) * 2019-11-12 2020-03-13 中山大学 Video face tampering detection method and system based on cyclic convolution neural network

Also Published As

Publication number Publication date
CN113449542A (en) 2021-09-28

Similar Documents

Publication Publication Date Title
US10983596B2 (en) Gesture recognition method, device, electronic device, and storage medium
CN110610127B (en) Face recognition method and device, storage medium and electronic equipment
CN109118420B (en) Watermark identification model establishing and identifying method, device, medium and electronic equipment
CN113221983B (en) Training method and device for transfer learning model, image processing method and device
CN110879986A (en) Face recognition method, apparatus and computer-readable storage medium
CN113255516A (en) Living body detection method and device and electronic equipment
CN114627526A (en) Fusion duplicate removal method and device based on multi-camera snapshot image and readable medium
CN110796039B (en) Face flaw detection method and device, electronic equipment and storage medium
US11348254B2 (en) Visual search method, computer device, and storage medium
CN112966687B (en) Image segmentation model training method and device and communication equipment
CN112528903B (en) Face image acquisition method and device, electronic equipment and medium
CN111985400A (en) Face living body identification method, device, equipment and storage medium
CN113837006A (en) Face recognition method and device, storage medium and electronic equipment
CN111063011B (en) Face image processing method, device, equipment and medium
CN110263704B (en) Face data acquisition method, device, server, video acquisition device and medium
CN113449542B (en) Face-changing identification method, device, equipment and medium
CN116091481A (en) Spike counting method, device, equipment and storage medium
CN113762027B (en) Abnormal behavior identification method, device, equipment and storage medium
CN113642443A (en) Model testing method and device, electronic equipment and storage medium
CN111104844B (en) Multi-invoice information input method and device, electronic equipment and storage medium
JP2018137639A (en) Moving image processing system, encoder and program, decoder and program
CN109460511B (en) Method and device for acquiring user portrait, electronic equipment and storage medium
CN112559340A (en) Picture testing method, device, equipment and storage medium
CN113762017A (en) Action recognition method, device, equipment and storage medium
CN112308055A (en) Evaluation method and device of face retrieval system, electronic equipment and storage medium

Legal Events

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