WO2023142419A1 - 人脸跟踪识别方法、装置、电子设备、介质及程序产品 - Google Patents

人脸跟踪识别方法、装置、电子设备、介质及程序产品 Download PDF

Info

Publication number
WO2023142419A1
WO2023142419A1 PCT/CN2022/110287 CN2022110287W WO2023142419A1 WO 2023142419 A1 WO2023142419 A1 WO 2023142419A1 CN 2022110287 W CN2022110287 W CN 2022110287W WO 2023142419 A1 WO2023142419 A1 WO 2023142419A1
Authority
WO
WIPO (PCT)
Prior art keywords
frame
detection
face
feature information
nth
Prior art date
Application number
PCT/CN2022/110287
Other languages
English (en)
French (fr)
Inventor
蒲金润
张垚
张帅
伊帅
Original Assignee
上海商汤智能科技有限公司
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 上海商汤智能科技有限公司 filed Critical 上海商汤智能科技有限公司
Publication of WO2023142419A1 publication Critical patent/WO2023142419A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures

Definitions

  • the present disclosure relates to the field of computer technology, and in particular to a face tracking and recognition method, device, electronic equipment, media and program product.
  • Face tracking is an algorithm that uses algorithms to detect faces in video frames or continuous pictures, and processes the correlation of faces in video frames or pictures. There are many applications in actual scenarios, such as facial recognition payment in the financial field.
  • the face tracking algorithm in the related art has a large amount of calculation and a slow reasoning speed.
  • Embodiments of the present disclosure propose a face tracking and recognition method, device, electronic equipment, medium, and program product, aiming at saving computing power and improving the efficiency of face tracking and recognition.
  • An embodiment of the present disclosure provides a method for face tracking and recognition, including: determining the i-th frame in the video frame sequence as an initial key frame, where i is any positive integer greater than or equal to 1; Face detection, obtaining at least one first detection frame representing the position of the face in the i-th frame, and determining the face feature information of the face area in each of the first detection frames in the i-th frame; adjusting the first detection frame At least one first detection frame of the i frame obtains the second detection frame of the i+1th frame; obtains the detection area in each of the second detection frames of the i+1th frame; performs local human detection on the detection area Face detection, obtaining at least one first detection frame representing the position of the face in the i+1th frame, and determining the face feature information of the face area in each of the first detection frames in the i+1th frame ; Comparing the face feature information of the ith frame with the face feature information of the i+1th frame to obtain the same face.
  • the embodiment of the present disclosure can determine the face detection range in the current frame by adjusting the detection frame of the previous frame in the continuous video frame, that is, the face recognition in the video frame is performed by combining the global face detection and local face detection, and the Some of the key frames perform global face detection, and by adjusting the detection frame of the previous frame in the continuous video frame, the face detection range in the current frame is determined to perform local detection on other non-key frames; in this way, the face detection can be reduced.
  • the computing power required for the process improves the efficiency of face tracking and recognition.
  • An embodiment of the present disclosure provides a face tracking and recognition device, including: a key frame determination module, configured to determine the i-th frame in the video frame sequence as the initial key frame, where i is any positive integer greater than or equal to 1; A detection module, configured to perform global face detection on the i-th frame, obtain at least one first detection frame representing the position of the face in the i-th frame, and determine each of the first detection frames in the i-th frame Face feature information in the face area; the first detection frame determination module, used to adjust at least one first detection frame of the i frame to obtain the second detection frame of the i+1 frame; the first region extraction module, It is used to obtain the detection area in each of the second detection frames in the i+1th frame; the second detection module is used to perform partial face detection on the detection area to obtain at least one of the i+1th frame Characterize the first detection frame of the face position, and determine the face feature information of the face area in each of the first detection frames in the i+1 frame; the first matching module is used to compare the
  • An embodiment of the present disclosure provides an electronic device, including: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to call the instructions stored in the memory to execute the above method.
  • An embodiment of the present disclosure provides a computer-readable storage medium on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the foregoing method is implemented.
  • An embodiment of the present disclosure provides a computer program, the computer program includes computer readable code, and when the computer readable code runs in an electronic device, the processor of the electronic device is used to implement the above-mentioned method.
  • An embodiment of the present disclosure provides a computer program product, where the computer program product includes computer readable codes, or a non-volatile computer readable storage medium carrying the computer readable codes, where the computer readable codes are stored in
  • the processor in the electronic device runs, the processor in the electronic device implements the above method when executed.
  • Embodiments of the present disclosure provide a face tracking and recognition method, device, electronic equipment, medium, and program product, wherein the i-th frame in the video frame sequence is determined as the initial key frame; and the i-th frame is obtained by global face detection At least one of the first detection frames representing the position of the face and the face feature information of the face area in each first detection frame; adjusting at least one first detection frame of the i frame to obtain the second detection of the i+1 frame frame; obtain the detection area in each second detection frame of the i+1th frame and perform local face detection to obtain at least one first detection frame representing the position of the face and the face of the face area in each first detection frame Feature information; compare the face feature information of the i-th frame with the face feature information of the i+1th frame to obtain the same face.
  • the embodiment of the present disclosure can determine the face detection range in the current frame by adjusting the detection frame of the previous frame in the continuous video frame, that is, the face recognition in the video frame is performed by combining the global face detection and local face detection, and the Some of the key frames perform global face detection, and by adjusting the detection frame of the previous frame in the continuous video frame, the face detection range in the current frame is determined to perform local detection on other non-key frames; in this way, the face detection can be reduced.
  • the computing power required for the process improves the efficiency of face tracking and recognition.
  • FIG. 1 shows a flow chart of a face tracking and recognition method according to an embodiment of the present disclosure
  • Fig. 2 shows a schematic diagram of a first detection frame according to an embodiment of the present disclosure
  • Fig. 3 shows a schematic diagram of a second detection frame according to an embodiment of the present disclosure
  • Fig. 4 shows a schematic diagram of a process of extracting facial feature information according to an embodiment of the present disclosure
  • Fig. 5 shows a schematic diagram of a face tracking and recognition device according to an embodiment of the present disclosure
  • FIG. 6 shows a schematic diagram of an electronic device according to an embodiment of the present disclosure
  • Fig. 7 shows a schematic diagram of another electronic device according to an embodiment of the present disclosure.
  • the face tracking and recognition method in the embodiments of the present disclosure may be executed by an electronic device such as a terminal device or a server.
  • the terminal device may be user equipment (User Equipment, UE), mobile device, user terminal, terminal, cellular phone, cordless phone, personal digital assistant (Personal Digital Assistant, PDA), handheld device, computing device, vehicle-mounted device, Any fixed or mobile terminal such as wearable devices.
  • the server can be a single server or a server cluster composed of multiple servers. Any electronic device may implement the face tracking and recognition method of the embodiments of the present disclosure by calling the computer-readable instructions stored in the memory by the processor.
  • the embodiments of the present disclosure can be applied to any application scenario that requires face tracking and recognition, such as facial recognition payment and recognition of specific persons in multiple images.
  • Fig. 1 shows a flow chart of a face tracking and recognition method according to an embodiment of the present disclosure.
  • the face tracking and recognition method of the embodiment of the present disclosure may include the following steps S10 to S60:
  • Step S10 determining the i-th frame in the video frame sequence as an initial key frame.
  • the video frame sequence may be determined according to continuous video frames obtained by continuously collecting multiple images, or the video frame sequence may be determined by extracting multiple images from the continuously collecting multiple images.
  • the multiple images in the video frame sequence can be directly collected by an image acquisition device built into or connected to the electronic device, or other devices can collect and determine the video frame sequence through the image acquisition device and send it to the implementation of the present disclosure.
  • Example of electronic equipment for face tracking and recognition methods After determining the video frame sequence, the electronic device extracts the i-th frame from the video frame sequence as an initial key frame. Wherein, i can be any integer greater than or equal to 1.
  • each video frame in the video frame sequence may include at least one person's face. After determining that the i-th frame is the initial key frame, the electronic device may determine whether the current frame is a key frame sequentially backward from the i-th frame, so as to perform face detection according to the judgment result.
  • Step S20 perform global face detection on the i-th frame, obtain at least one first detection frame representing the position of a face in the i-th frame, and determine the face in each of the first detection frames in the i-th frame The face feature information of the region.
  • the electronic device after the electronic device extracts the i-th frame as the initial key frame in the acquired video frame sequence, it performs global face detection on the i-th frame, and obtains at least one character representing the position of the face in the i-th frame The first detection frame.
  • the global face detection process can be realized by a deep learning model with a complex structure and a large amount of calculation.
  • the detection process of the i-th video frame may be to input the i-th frame into the trained first face recognition model to obtain at least one first detection frame of the i-th frame.
  • the first face recognition model is used to perform global face detection on the input image to obtain the first detection frame of the input image.
  • Fig. 2 shows a schematic diagram of a first detection frame according to an embodiment of the present disclosure.
  • the first detection frame 21 corresponding to the face included in it can be obtained by performing global face detection. position in .
  • the electronic device determines the face feature information of the face area in each first detection frame of the i-th frame.
  • the feature extraction process can be to extract the face area in each first detection frame in the i-th frame, and input each face area into the feature extraction model obtained by training, and perform feature extraction through the feature extraction model. Corresponding face feature information is extracted, and the face feature information represents features corresponding to the face included in the first detection frame.
  • Step S30 adjusting at least one first detection frame of the i-th frame to obtain a second detection frame of the i+1-th frame.
  • the video frame sequence is obtained by continuously collecting multiple images of at least one person in a short period of time, the same person may have a certain position shift in adjacent video frames due to the movement of the person. . Since the acquisition time between adjacent video frames is very short, the position offset is generally a small offset. Therefore, the area where the face position is located in the next frame can be roughly positioned through the face position of the previous frame, and then the second face recognition is performed on the positioning area to obtain the position of the face in the next frame; Determine the speed of the detection area in each second detection frame in the i+1th frame.
  • the size of each first detection frame in the previous video frame can be adjusted to obtain a second detection frame, and local face detection is performed on the detection area in each of the second detection frames to obtain at least one The first detection frame. Therefore, for the i+1th frame located next to the i-th frame in the sequence of video frames, the second detection frame of the i+1th frame can be obtained by adjusting at least one first detection frame of the i-th frame.
  • the process of adjusting at least one first detection frame of the i-th frame to obtain the second detection frame of the i+1-th frame may be to adjust at least one of the i-th frame according to the preset zoom size
  • the first detection frame is scaled to obtain at least one second detection frame of the i+1th frame.
  • the scaling process can use the center position of the first detection frame as a reference, and expand the first detection frame outward to obtain the second detection frame.
  • the second detection frame can be obtained by expanding the first detection frame outward by 0.6 times based on the center position of the first detection frame.
  • Fig. 3 shows a schematic diagram of a second detection frame according to an embodiment of the present disclosure.
  • the first detection frame 21 corresponding to the face included in the key frame 20 can be obtained after the global face detection
  • the first detection frame 21 is scaled with the center position of the first detection frame 21 as a reference to obtain The second detection frame 22 .
  • it is also possible to perform local face detection by extracting the detection area in the second detection frame 22 position of the key frame 20 in the next frame adjacent in time sequence to obtain one of the video frames of the next frame of the key frame 20.
  • the first detection frame is also possible to perform local face detection by extracting the detection area in the second detection frame 22 position of the key frame 20 in the next frame adjacent in time sequence to obtain one of the video frames of the next frame of the key frame 20.
  • Step S40 acquiring the detection area in each of the second detection frames in the i+1th frame.
  • the electronic device after determining at least one second detection frame in the i+1th frame, extracts a detection area in each second detection frame in the i+1th frame.
  • the second detection frame is used to represent a detection area where a human face may exist in the i+1th frame.
  • the detection area is used for partial face detection to determine the location of the human face in the i+1th frame.
  • Step S50 perform local face detection on the detection area, obtain at least one first detection frame representing the position of the face in the i+1th frame, and determine each of the first detection frames in the i+1th frame The face feature information of the middle face area.
  • the electronic device after determining the plurality of detection areas in the i+1th frame, performs partial face detection on each detection area, and obtains at least one character representing the position of the face in the i+1th frame
  • the first detection frame is used to determine the position of the face in the i+1th frame.
  • the local face detection process can be realized by the second face recognition model, and the second face recognition model has less complexity and calculation amount than the first face recognition model that performs the global face detection process. That is to say, for the i+1th frame, extract the detection area in each second detection frame, and input each detection area into the trained second face recognition model, and output at least one of the i+1th frame A detection frame.
  • the electronic device determines the face feature information of the face area in each first detection frame of the i+1th frame.
  • the feature extraction process may refer to the above-mentioned feature extraction process for the i-th frame.
  • Step S60 comparing the face feature information of the i-th frame with the face feature information of the i+1-th frame to obtain the same face.
  • the electronic device after the electronic device obtains the face feature information of the i-th frame and the i+1-th frame, it compares the face feature information of the i-th frame with the face feature information of the i+1-th frame, get the same face.
  • the comparison result can be obtained by calculating the similarity between each face feature information in the i-th frame and each face feature information in the i+1th frame.
  • the feature information of the face can be represented in the form of a vector
  • the calculation method of the similarity can be obtained by directly calculating the Euclidean distance of the feature information of the face.
  • the Euclidean distance is inversely proportional to the similarity. The smaller the distance, the greater the similarity.
  • the reciprocal of the distance can be directly determined as the similarity. That is, for each face feature information in the i-th frame, its similarity with each face feature information in the i+1th frame is calculated in turn, and the two face feature information with the largest similarity are determined to match. The electronic device determines that the faces corresponding to the two matched face feature information are the same face.
  • the first detection frame corresponding to each face area in the i+1th frame is determined based on the first detection frame of the i-th frame, in order to improve the efficiency of the feature information comparison process, it is possible to directly calculate
  • the face feature information of the face in each first detection frame in the i frame is similar to the face feature information corresponding to at least one face in the first detection frame in the i+1 frame, and the two with the largest similarity are determined.
  • personal face feature information matching it may also be determined that the two face feature information with the highest similarity among the similarity thresholds are matched, so as to determine that the faces corresponding to the matched two face feature information are the same face.
  • the electronic device may predetermine a video frame at a preset position in the video frame sequence as a key frame.
  • the electronic device may perform global face detection on each key frame in the video frame sequence to determine the position of the face in it, and perform local face detection on each non-key frame in the video frame sequence to determine the person in it. face position. That is to say, for other video frames in the video frame sequence, it is possible to first judge whether the video frame is a key frame, and then perform corresponding face detection according to the judgment result, and obtain the first detection representing at least one face position in each video frame frame.
  • the face feature information of the face area in the first detection frame of each video frame is extracted and matched with adjacent video frames.
  • the electronic device may determine whether the i+nth frame is a key frame according to the positional relationship between the ith frame and the i+nth frame, where n is an integer greater than or equal to 2.
  • the i+nth frame being a key frame
  • perform global face detection on the i+nth frame obtain at least one first detection frame representing the position of the face in the i+nth frame, and determine the i+nth frame
  • the face feature information of the i+n-1th frame is compared with the face feature information of the i+nth frame to obtain the same face.
  • the i+n-1 frame is a non-key frame, that is, the i+n-1 frame performs partial face detection.
  • the process of performing global face detection on the i+n frame is similar to the global face detection process of the i frame, and the face feature information of the i+n-1 frame is the same as that of the i+n frame.
  • the comparison process of the face feature information is similar to the comparison process of the face feature information of the i-th frame and the i+1-th frame.
  • the electronic device may also adjust at least one first detection frame of the i+n-1th frame to obtain the second detection frame of the i+nth frame in response to the i+nth frame being a non-key frame frame.
  • Perform local face detection on the detection area obtain at least one first detection frame representing the position of the face in the i+nth frame, and determine the face feature information of the face area in each first detection frame of the i+nth frame .
  • the process of adjusting at least one first detection frame of the i+n-1th frame to obtain the second detection frame of the i+nth frame can refer to the above-mentioned adjustment of at least one first detection frame of the i-th frame The process of obtaining the second detection frame of the i+1th frame.
  • the electronic device may determine the key frame according to the interval period, so that the distance between every two adjacent key frames in the sequence of video frames is a fixed interval period. That is to say, when the electronic device judges whether the i+n frame is a key frame according to the positional relationship, it can determine the i+n frame in response to the position distance n between the i frame and the i+n frame being an integer multiple of the interval period for keyframes.
  • the video frame sequence length is 20 as an example for illustration.
  • the interval period is 5 and i is 1, the positions of key frames are frame 1, frame 6, frame 11 and frame 16. Other frames are non-keyframes.
  • the interval period may be a preset time period, or determined according to the movement speed of the human face in the current video frame sequence.
  • the face tracking and recognition method in the embodiment of the present disclosure can also obtain the movement speed of the human face in the video frame sequence after determining the video frame sequence, and then according to the movement speed , to determine the interval period.
  • the movement speed may be negatively correlated with the interval period, and the determined interval period is shorter when the movement speed is faster.
  • the electronic device determines that each frame in the sequence of video frames has the same face as that in adjacent video frames in the above manner, it can Determining the same human face in the sequence of video frames can realize the tracking and recognition of faces that have appeared in the sequence of video frames.
  • Fig. 4 shows a schematic diagram of a process of extracting facial feature information according to an embodiment of the present disclosure.
  • the electronic device acquires the video frames 40 sequentially. After acquiring the video frame 40, determine whether the currently acquired video frame is a key frame 41, directly perform global face detection 42 on the current video frame when the current video frame is a key frame, and obtain at least one first detection corresponding to the current video frame Box 43. At the same time, when the current video frame is not a key frame, a corresponding second detection frame 45 is determined according to each first detection frame corresponding to the video frame located one frame before the current frame in the sequence of video frames.
  • each second detection frame 45 in the current video frame is extracted to obtain the detection area 46, and the local face detection 47 is performed on the detection area 46 to obtain the first detection frame 43 corresponding to the current frame.
  • the region in each first detection frame 43 is extracted to obtain a human face region 44, and each human face region 44 is input into a feature extraction model 48 to obtain Corresponding face feature information 49.
  • the embodiment of the present disclosure can perform global face detection on some of the key frames when performing face tracking and recognition on a sequence of video frames, and adjust the detection frame of the previous frame in the continuous video frames , determine the range of face detection in the current frame and perform local detection on other non-key frames.
  • the face detection method can reduce the computing power required for the face detection process and improve the efficiency of face tracking and recognition.
  • the performance of the face tracking and recognition process is improved through periodic global detection, which can reduce the missed detection and repeated detection of faces.
  • the present disclosure also provides face tracking and recognition devices, electronic equipment, computer-readable storage media, and programs, all of which can be used to implement any face tracking and recognition methods provided in the present disclosure, corresponding technical solutions and descriptions, and refer to methods Part of the corresponding record.
  • FIG. 5 shows a schematic diagram of a face tracking and recognition device according to an embodiment of the present disclosure.
  • the first detection frame determination part 53, the first region extraction part 54, the second detection part 55 and the first matching part 56 wherein:
  • the key frame determining part 51 is configured to determine the i-th frame in the video frame sequence as an initial key frame, where i is an integer greater than or equal to 1;
  • the first detection part 52 is configured to perform global face detection on the i-th frame, obtain at least one first detection frame representing the position of a face in the i-th frame, and determine each of the i-th frame The face feature information of the face area in the detection frame;
  • the first detection frame determining part 53 is configured to adjust at least one first detection frame of the i-th frame to obtain a second detection frame of the i+1-th frame;
  • the first area extraction part 54 is configured to acquire the detection area in each of the second detection frames in the i+1th frame
  • the second detection part 55 is configured to perform local human face detection on the detection area, obtain at least one first detection frame representing the position of a human face in the i+1th frame, and determine each of the i+1th frame The face feature information of the face area in the first detection frame;
  • the first matching part 56 is configured to compare the face feature information of the ith frame with the face feature information of the i+1th frame to obtain the same face.
  • the device further includes: a key frame determining part, further configured to determine whether the i+nth frame is key frame, n is an integer greater than or equal to 2; the third detection part is configured to respond to the i+nth frame being a key frame, and perform global face detection on the i+nth frame to obtain the i+nth frame At least one first detection frame representing the position of the face in +n frames, and determine the face feature information of the face area in each of the first detection frames in the i+nth frame; the second matching part is configured In order to compare the face feature information of the i+n-1th frame with the face feature information of the i+nth frame to obtain the same face, wherein, the i+n-1th frame is a partial face face detection.
  • the apparatus further includes: a second detection frame determining part configured to adjust at least one of the i+n-1th frame in response to the i+nth frame being a non-key frame
  • the first detection frame obtains the second detection frame of the i+nth frame
  • the second area extraction part is configured to obtain the detection area in each of the second detection frames of the i+nth frame
  • the fourth The detection part is configured to perform partial face detection on the detection area, obtain at least one first detection frame representing the position of a face in the i+nth frame, and determine each of the i+nth frame
  • the third matching part is configured to compare the face feature information of the i+n-1th frame with the face feature information of the i+nth frame to obtain the same faces, wherein the i+n-1th frame performs local face detection or global face detection.
  • the key frame determination part 51 includes: a key frame determination subsection configured to respond to the position distance n of the i-th frame and the i+n-th frame being an integer of an interval period times, determine that the i+nth frame is a key frame.
  • the device further includes: a speed determination part configured to acquire the motion speed of the human face in the video frame sequence; a cycle determination part configured to determine the the interval period mentioned above.
  • the first detection frame determining part 53 includes: a size scaling sub-section configured to perform the at least one first detection in the i-th frame according to a preset scaling size. The frame is scaled to obtain at least one second detection frame of the i+1th frame.
  • the apparatus further includes: a tracking identification part configured to determine the same human face in the video frame sequence according to the same human face in adjacent video frames in the video frame sequence.
  • This method has a specific technical relationship with the internal structure of the computer system, and it can solve the technical problems of how to improve the hardware computing efficiency or execution effect (including reducing the amount of data storage, reducing the amount of data transmission, increasing the processing speed of the hardware, etc.), so as to obtain a natural The technical effect of regular computer system internal performance improvements.
  • the functions or parts included in the apparatus provided by the embodiments of the present disclosure can be used to execute the methods described in the above method embodiments, and for specific implementation, refer to the descriptions of the above method embodiments.
  • Embodiments of the present disclosure also propose a computer-readable storage medium, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the face tracking and recognition method provided by any of the above-mentioned embodiments is implemented; wherein, the computer can
  • the read storage medium may be a volatile or non-volatile computer readable storage medium.
  • An embodiment of the present disclosure also proposes an electronic device, including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to call the instructions stored in the memory to perform any of the above implementations
  • the face tracking and recognition method provided by the example is not limited to: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to call the instructions stored in the memory to perform any of the above implementations.
  • An embodiment of the present disclosure also provides a computer program, the computer program includes computer readable codes, and when the computer readable codes run in an electronic device, the processor of the electronic device is used to implement any An embodiment provides a face tracking and recognition method.
  • An embodiment of the present disclosure also provides a computer program product, including computer-readable codes, or a non-volatile computer-readable storage medium carrying computer-readable codes, when the computer-readable codes are stored in a processor of an electronic device When running in the electronic device, the processor in the electronic device executes the face tracking and recognition method provided in any one of the above embodiments.
  • Electronic devices may be provided as terminals, servers, or other forms of devices.
  • FIG. 6 shows a schematic diagram of an electronic device 800 according to an embodiment of the present disclosure.
  • the electronic device 800 may be a UE, a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a PDA, a handheld device, a computing device, a vehicle device, a wearable device, and other terminal devices.
  • the electronic device 800 may include one or more of the following components: a processing component 802, a memory 804, a power supply component 806, a multimedia component 808, an audio component 810, an input/output (Input/Output, I/O) interface 812, sensor component 814, and communication component 816.
  • the processing component 802 generally controls the overall operations of the electronic device 800, such as those associated with display, telephone calls, data communications, camera operations, and recording operations.
  • the processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above method. Additionally, processing component 802 may include one or more modules that facilitate interaction between processing component 802 and other components. For example, processing component 802 may include a multimedia module to facilitate interaction between multimedia component 808 and processing component 802 .
  • the memory 804 is configured to store various types of data to support operations at the electronic device 800 . Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phonebook data, messages, pictures, videos, and the like.
  • the memory 804 can be realized by any type of volatile or non-volatile storage device or their combination, such as Static Random-Access Memory (Static Random-Access Memory, SRAM), Electrically Erasable Programmable Read-Only Memory (Electrically Erasable Programmable Read Only Memory, EEPROM), Erasable Programmable Read Only Memory (Electrical Programmable Read Only Memory, EPROM), Programmable Read-Only Memory (Programmable Read-Only Memory, PROM), Read Only Memory (Read Only Memory, ROM), magnetic memory, flash memory, magnetic or optical disk.
  • Static Random-Access Memory Static Random-Access Memory
  • SRAM Static Random-Access Memory
  • EEPROM Electrically Erasable Programmable Read-Only Memory
  • EPROM Electrical Programmable Programmable Read Only Memory
  • the power supply component 806 provides power to various components of the electronic device 800 .
  • Power components 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for electronic device 800 .
  • the multimedia component 808 includes a screen providing an output interface between the electronic device 800 and the user.
  • the screen may include a liquid crystal display (Liquid Crystal Display, LCD) and a touch panel (TouchPanel, TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user.
  • the touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may not only sense a boundary of a touch or swipe action, but also detect duration and pressure associated with the touch or swipe action.
  • the multimedia component 808 includes a front camera and/or a rear camera. When the electronic device 800 is in an operation mode, such as a shooting mode or a video mode, the front camera and/or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have focal length and optical zoom capability.
  • the audio component 810 is configured to output and/or input audio signals.
  • the audio component 810 includes a microphone (Microphone, MIC), and when the electronic device 800 is in an operation mode, such as a calling mode, a recording mode and a voice recognition mode, the microphone is configured to receive an external audio signal.
  • received audio signals may be stored in memory 804 or sent via communication component 816 .
  • the audio component 810 also includes a speaker for outputting audio signals.
  • the I/O interface 812 provides an interface between the processing component 802 and a peripheral interface module, which may be a keyboard, a click wheel, a button, and the like. These buttons may include, but are not limited to: a home button, volume buttons, start button, and lock button.
  • Sensor assembly 814 includes one or more sensors for providing status assessments of various aspects of electronic device 800 .
  • the sensor component 814 can detect the open/closed state of the electronic device 800, the relative positioning of components, such as the display and the keypad of the electronic device 800, the sensor component 814 can also detect the electronic device 800 or a Changes in position of components, presence or absence of user contact with electronic device 800 , electronic device 800 orientation or acceleration/deceleration and temperature changes in electronic device 800 .
  • Sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects in the absence of any physical contact.
  • the sensor assembly 814 may also include an optical sensor, such as a Complementary Metal Oxide Semiconductor (CMOS) or Charge-coupled Device (CCD) image sensor, for use in imaging applications.
  • CMOS Complementary Metal Oxide Semiconductor
  • CCD Charge-coupled Device
  • the sensor component 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor or a temperature sensor.
  • the communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices.
  • the electronic device 800 can access wireless networks based on communication standards, such as wireless networks (Wi-Fi), second-generation mobile communication technologies (2-Generation, 2G), third-generation mobile communication technologies (3-Generation, 3G), The 4th Generation Mobile Communication Technology (4G), the Long Term Evolution (LTE) of the Universal Mobile Communication Technology, the 5th Generation Mobile Communication Technology (5G) or their
  • the communication component 816 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel.
  • the communication component 816 also includes near field communication ( Near Field Communication, NFC) module to facilitate short-range communication.
  • NFC Near Field Communication
  • the NFC module can be based on Radio Frequency Identification (RFID) technology, Infrared Data Association (Infrared Data Association, IrDA) technology, Ultra Wide Band (Ultra Wide Band, UWB) technology, Bluetooth (BitTorrent, BT) technology and other technologies to achieve.
  • RFID Radio Frequency Identification
  • IrDA Infrared Data Association
  • UWB Ultra Wide Band
  • Bluetooth BitTorrent, BT
  • the electronic device 800 may be implemented by one or more Application Specific Integrated Circuits (Application Specific Integrated Circuit, ASIC), Digital Signal Processor (Digital Signal Processor, DSP), Digital Signal Processor Device (Digital Signal Processor Device , DSPD), Programmable Logic Device (Programmaile Lofic Device, PLD), Field Programmable Gate Array (Field Programmable Gate Array, FPGA), controller, microcontroller, microprocessor or other electronic components to implement the above method.
  • ASIC Application Specific Integrated Circuits
  • DSP Digital Signal Processor
  • DSPD Digital Signal Processor Device
  • PLD Programmable Logic Device
  • FPGA Field Programmable Gate Array
  • controller microcontroller, microprocessor or other electronic components to implement the above method.
  • a non-volatile computer-readable storage medium such as a memory 804 including computer program instructions, which can be executed by the processor 820 of the electronic device 800 to complete any of the above-mentioned implementations.
  • a non-volatile computer-readable storage medium such as a memory 804 including computer program instructions, which can be executed by the processor 820 of the electronic device 800 to complete any of the above-mentioned implementations.
  • the face tracking and recognition method provided by the example.
  • This disclosure relates to the field of augmented reality.
  • acquiring the image information of the target object in the real environment and then using various visual correlation algorithms to detect or identify the relevant features, states and attributes of the target object, and thus obtain the image information that matches the specific application.
  • AR effect combining virtual and reality.
  • the target object may involve faces, limbs, gestures, actions, etc. related to the human body, or markers and markers related to objects, or sand tables, display areas or display items related to venues or places.
  • Vision-related algorithms can involve visual positioning, SLAM, 3D reconstruction, image registration, background segmentation, object key point extraction and tracking, object pose or depth detection, etc.
  • Specific applications can not only involve interactive scenes such as guided tours, navigation, explanations, reconstructions, virtual effect overlays and display related to real scenes or objects, but also special effects processing related to people, such as makeup beautification, body beautification, special effect display, virtual Interactive scenarios such as model display.
  • the relevant features, states and attributes of the target object can be detected or identified through the convolutional neural network.
  • the above-mentioned convolutional neural network is a network model obtained by performing model training based on a deep learning framework.
  • FIG. 7 shows a schematic diagram of another electronic device 1900 according to an embodiment of the present disclosure.
  • the electronic device 1900 may be provided as a server or terminal device.
  • electronic device 1900 includes a processing component 1922.
  • electronic device 1900 includes one or more processors, and a memory resource represented by memory 1932 for storing instructions executable by processing component 1922. , such as the application.
  • the application programs stored in memory 1932 may include one or more modules each corresponding to a set of instructions.
  • the processing component 1922 is configured to execute instructions to perform the above method.
  • Electronic device 1900 may also include a power component 1926 configured to perform power management of electronic device 1900 , a wired or wireless network interface 1950 configured to connect electronic device 1900 to a network, and I/O interface 1958 .
  • the electronic device 1900 can operate based on the operating system stored in the memory 1932, such as the Microsoft server operating system (Windows ServerTM), the graphical user interface-based operating system (Mac OS XTM) introduced by Apple Inc., and the multi-user and multi-process computer operating system (UnixTM). ), a free and open source Unix-like operating system (LinuxTM), an open source Unix-like operating system (FreeBSDTM), or similar.
  • a non-transitory computer-readable storage medium such as the memory 1932 including computer program instructions, which can be executed by the processing component 1922 of the electronic device 1900 to implement the above method.
  • the present disclosure can be a system, method and/or computer program product.
  • a computer program product may include a computer readable storage medium having computer readable program instructions thereon for causing a processor to implement various aspects of the present disclosure.
  • a computer readable storage medium may be a tangible device that can retain and store instructions for use by an instruction execution device.
  • a computer readable storage medium may be, for example, but is not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing.
  • computer-readable storage media include: portable computer disk, hard disk, Random Access Memory (RAM), ROM, EPROM or flash memory, SRAM, portable compact disk read-only Compact Disc-Read Only Memory (CD-ROM), Digital Versatile Disc (DVD), memory sticks, floppy disks, mechanically encoded devices such as punched cards or grooved indents with instructions stored thereon structure, and any suitable combination of the above.
  • computer-readable storage media are not to be construed as transient signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., pulses of light through fiber optic cables), or transmitted electrical signals.
  • Computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to a respective computing/processing device, or downloaded to an external computer or external storage device over a network, such as the Internet, a local area network, a wide area network, and/or a wireless network.
  • the network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and/or edge servers.
  • a network adapter card or a network interface in each computing/processing device receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in each computing/processing device .
  • Computer program instructions for performing operations of embodiments of the present disclosure may be assembly instructions, instruction set architecture (Instruction Set Architecture, ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or in the form of a or any combination of programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" or similar programming languages language.
  • Computer readable program instructions 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 implement.
  • the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or it may be connected to an external computer such as use an Internet service provider to connect via the Internet).
  • electronic circuits such as programmable logic circuits, FPGAs, or programmable logic arrays (Programmable Logic Arrays, PLAs), can be customized by using state information of computer-readable program instructions, which can execute computer-readable Read program instructions, thereby implementing various aspects of the present disclosure.
  • These computer-readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine such that when executed by the processor of the computer or other programmable data processing apparatus , producing an apparatus for realizing the functions/actions specified in one or more blocks in the flowchart and/or block diagram.
  • These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause computers, programmable data processing devices and/or other devices to work in a specific way, so that the computer-readable medium storing instructions includes An article of manufacture comprising instructions for implementing various aspects of the functions/acts specified in one or more blocks in flowcharts and/or block diagrams.
  • each block in a flowchart or block diagram may represent a module, a portion of a program segment, or an instruction that includes one or more Executable instructions.
  • the functions noted in the block may occur out of the order noted in the figures. For example, two blocks in succession may, in fact, be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved.
  • each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations can be implemented by a dedicated hardware-based system that performs the specified function or action , or may be implemented by a combination of dedicated hardware and computer instructions.
  • the computer program product can be specifically realized by means of hardware, software or a combination thereof.
  • the computer program product is embodied as a computer storage medium, and in another optional embodiment, the computer program product is embodied as a software product, such as a software development kit (Software Development Kit, SDK) etc. wait.
  • a software development kit Software Development Kit, SDK
  • the writing order of each step does not mean a strict execution order and constitutes any limitation on the implementation process.
  • the specific execution order of each step should be based on its function and possible
  • the inner logic is OK.
  • the products applying the technical solutions of the embodiments of the present disclosure have clearly notified the personal information processing rules and obtained the individual's independent consent before processing personal information.
  • the technical solutions of the embodiments of the present disclosure involve sensitive personal information
  • the products applying the technical solutions of the embodiments of the present disclosure have obtained the individual consent before processing the sensitive personal information, and at the same time meet the requirement of "express consent". For example, at a personal information collection device such as a camera, a clear and prominent sign is set up to inform that it has entered the scope of personal information collection, and personal information will be collected.
  • the personal information processing rules may include Information such as the information processor, the purpose of personal information processing, the method of processing, and the type of personal information processed.
  • Embodiments of the present disclosure relate to a face tracking and recognition method, device, electronic equipment, medium, and program product, which determine the i-th frame in the video frame sequence as the initial key frame; perform global face detection on the i-th frame to obtain at least A first detection frame representing the position of the face and face feature information of the face area in each first detection frame; adjusting at least one first detection frame of the i-th frame to obtain a second detection frame of the i+1th frame; Obtain the detection area in each second detection frame of the i+1th frame for local face detection to obtain at least one first detection frame representing the position of the face and the face feature information of the face area in each first detection frame ; Comparing the face feature information of the i-th frame with the face feature information of the i+1th frame, the same face is obtained.

Landscapes

  • Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Image Analysis (AREA)

Abstract

一种人脸跟踪识别方法、装置、电子设备、介质及程序产品。该方法包括:确定视频帧序列中的第i帧作为初始的关键帧(S10);对第i帧进行全局人脸检测得到其中至少一个表征人脸位置的第一检测框以及每个第一检测框中人脸区域的人脸特征信息;调整第i帧的至少一个第一检测框得到第i+1帧的第二检测框(S30);获取第i+1帧每个第二检测框中的检测区域进行局部人脸检测得到其中至少一个表征人脸位置的第一检测框以及每个第一检测框中人脸区域的人脸特征信息;对比第i帧的人脸特征信息和第i+1帧的人脸特征信息,得到相同的人脸(S60)。该方法通过调整连续视频帧中前一帧的检测框确定当前帧中人脸检测范围,能够减小人脸检测过程所需的算力,提高人脸跟踪识别效率。

Description

人脸跟踪识别方法、装置、电子设备、介质及程序产品
相关申请的交叉引用
本公开要求2022年01月29日提交的中国专利申请号为202210112707.6、申请人为成都商汤科技有限公司,申请名称为“人脸跟踪识别方法及装置、电子设备和存储介质”的优先权,该申请的全文以引用的方式并入本公开中。
技术领域
本公开涉及计算机技术领域,尤其涉及一种人脸跟踪识别方法、装置、电子设备、介质及程序产品。
背景技术
人脸跟踪是利用算法将视频帧或者连续图片中的人脸检测出来,并处理视频帧或者图片中人脸相关性的算法。在实际场景中有诸多应用,如金融领域的刷脸支付等。相关技术的人脸跟踪算法计算量大,推理速度慢。
发明内容
本公开实施例提出了一种人脸跟踪识别方法、装置、电子设备、介质及程序产品,旨在节约算力,提高人脸跟踪识别的效率。
本公开实施例提供了一种人脸跟踪识别方法,包括:确定视频帧序列中的第i帧作为初始的关键帧,i为任一大于等于1的正整数;对所述第i帧进行全局人脸检测,得到第i帧中至少一个表征人脸位置的第一检测框,并确定所述第i帧每个所述第一检测框中人脸区域的人脸特征信息;调整所述第i帧的至少一个第一检测框得到第i+1帧的第二检测框;获取所述第i+1帧每个所述第二检测框中的检测区域;对所述检测区域进行局部人脸检测,得到所述第i+1帧中至少一个表征人脸位置的第一检测框,并确定所述第i+1帧每个所述第一检测框中人脸区域的人脸特征信息;对比所述第i帧的人脸特征信息和所述第i+1帧的人脸特征信息,得到相同的人脸。
本公开实施例能够通过调整连续视频帧中前一帧的检测框确定当前帧中人脸检测范围,即通过全局人脸检测和局部人脸检测相结合的方式进行视频帧中人脸识别,对其中部分关键帧进行全局的人脸检测,并通过调整连续视频帧中前一帧的检测框,确定当前帧中人脸检测范围对其他非关键帧进行局部检测;这样,能够减小人脸检测过程所需的算力,提高人脸跟踪识别效率。
本公开实施例提供了一种人脸跟踪识别装置,包括:关键帧确定模块,用于确定视频帧序列中的第i帧作为初始的关键帧,i为任一大于等于1的正整数;第一检测模块,用于对所述第i帧进行全局人脸检测,得到第i帧中至少一个表征人脸位置的第一检测框,并确定所述第i帧每个所述第一检测框中人脸区域的人脸特征信息;第一检测框确定模块,用于调整所述第i帧的至少一个第一检测框得到第i+1帧的第二检测框;第一区域提取模块,用于获取所述第i+1帧每个所述第二检测框中的检测区域;第二检测模块,用于对所述检测区域进行局部人脸检测,得到第i+1帧中至少一个表征人脸位置的第一检测框,并确定所述第i+1帧每个所述第一检测框中人脸区域的人脸特征信息;第一匹配模块,用于对比所述第i帧的人脸特征信息和所述第i+1帧的人脸特征信息,得到相同的人脸。
本公开实施例提供了一种电子设备,包括:处理器;用于存储处理器可执行指令的 存储器;其中,所述处理器被配置为调用所述存储器存储的指令,以执行上述方法。
本公开实施例提供了一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现上述方法。
本公开实施例提供了一种计算机程序,所述计算机程序包括计算机可读代码,在所述计算机可读代码在电子设备中运行的情况下,所述电子设备的处理器执行时用于实现上述方法。
本公开实施例提供了一种计算机程序产品,所述计算机程序产品包括计算机可读代码,或者承载所述计算机可读代码的非易失性计算机可读存储介质,在所述计算机可读代码在电子设备的处理器中运行时,所述电子设备中的处理器执行时实现上述方法。
本公开实施例提供一种人脸跟踪识别方法、装置、电子设备、介质及程序产品,其中,确定视频帧序列中的第i帧作为初始的关键帧;对第i帧进行全局人脸检测得到其中至少一个表征人脸位置的第一检测框以及每个第一检测框中人脸区域的人脸特征信息;调整第i帧的至少一个第一检测框得到第i+1帧的第二检测框;获取第i+1帧每个第二检测框中的检测区域进行局部人脸检测得到其中至少一个表征人脸位置的第一检测框以及每个第一检测框中人脸区域的人脸特征信息;对比第i帧的人脸特征信息和第i+1帧的人脸特征信息,得到相同的人脸。本公开实施例能够通过调整连续视频帧中前一帧的检测框确定当前帧中人脸检测范围,即通过全局人脸检测和局部人脸检测相结合的方式进行视频帧中人脸识别,对其中部分关键帧进行全局的人脸检测,并通过调整连续视频帧中前一帧的检测框,确定当前帧中人脸检测范围对其他非关键帧进行局部检测;这样,能够减小人脸检测过程所需的算力,提高人脸跟踪识别效率。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,而非限制本公开。根据下面参考附图对示例性实施例的详细说明,本公开的其它特征及方面将变得清楚。
附图说明
此处的附图被并入说明书中并构成本说明书的一部分,这些附图示出了符合本公开的实施例,并与说明书一起用于说明本公开的技术方案。
图1示出根据本公开实施例的一种人脸跟踪识别方法的流程图;
图2示出根据本公开实施例的一种第一检测框的示意图;
图3示出根据本公开实施例的一种第二检测框的示意图;
图4示出根据本公开实施例的一种人脸特征信息提取过程的示意图;
图5示出根据本公开实施例的一种人脸跟踪识别装置的示意图;
图6示出根据本公开实施例的一种电子设备的示意图;
图7示出根据本公开实施例的另一种电子设备的示意图。
具体实施方式
以下将参考附图详细说明本公开的各种示例性实施例、特征和方面。附图中相同的附图标记表示功能相同或相似的元件。尽管在附图中示出了实施例的各种方面,但是除非特别指出,不必按比例绘制附图。
在这里专用的词“示例性”意为“用作例子、实施例或说明性”。这里作为“示例性”所说明的任何实施例不必解释为优于或好于其它实施例。
本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中术语“至少一种”表示多种中的任意一种或多种中的至少两种的任意组合, 例如,包括A、B、C中的至少一种,可以表示包括从A、B和C构成的集合中选择的任意一个或多个元素。
另外,为了更好地说明本公开,在下文的具体实施方式中给出了众多的具体细节。本领域技术人员应当理解,没有某些具体细节,本公开同样可以实施。在一些实例中,对于本领域技术人员熟知的方法、手段、元件和电路未作详细描述,以便于凸显本公开的主旨。
在本公开的一些实施例中,本公开实施例的人脸跟踪识别方法可以由终端设备或服务器等电子设备执行。其中,终端设备可以为用户设备(User Equipment,UE)、移动设备、用户终端、终端、蜂窝电话、无绳电话、个人数字助理(Personal Digital Assistant,PDA)、手持设备、计算设备、车载设备、可穿戴设备等任意固定或移动终端。服务器可以为单独的服务器或多个服务器组成的服务器集群。任意电子设备可以通过处理器调用存储器中存储的计算机可读指令的方式来实现本公开实施例的人脸跟踪识别方法。
在本公开的一些实施例中,本公开实施例能够应用于任意需要进行人脸跟踪识别的应用场景,例如刷脸支付以及多图像中特定人物的识别等。
图1示出根据本公开实施例的一种人脸跟踪识别方法的流程图,如图1所示,本公开实施例的人脸跟踪识别方法可以包括以下步骤S10至S60:
步骤S10、确定视频帧序列中的第i帧作为初始的关键帧。
在本公开的一些实施例中,视频帧序列可以根据连续采集多个图像得到的连续视频帧确定,或者在连续采集多个图像中抽取多个图像确定视频帧序列。在一些实施例中,视频帧序列中的多个图像可以通过电子设备内置或连接的图像采集装置直接采集得到,或者由其他设备通过图像采集装置采集并确定视频帧序列后发送至执行本公开实施例人脸跟踪识别方法的电子设备。电子设备在确定视频帧序列后,从视频帧序列中提取第i帧作为初始的关键帧。其中,i可以为任一大于或等于1的整数。在本公开的一些实施例中,视频帧序列中每个视频帧中可以包括至少一个人物的人脸。电子设备可以在确定第i帧为初始的关键帧后,由第i帧开始,依次向后逐帧判断当前帧是否为关键帧,以根据判断结果进行人脸检测。
步骤S20、对所述第i帧进行全局人脸检测,得到第i帧中至少一个表征人脸位置的第一检测框,并确定所述第i帧每个所述第一检测框中人脸区域的人脸特征信息。
在本公开的一些实施例中,电子设备在获取视频帧序列中抽取第i帧作为初始的关键帧后,对第i帧进行全局人脸检测,得到第i帧中至少一个表征人脸位置的第一检测框。其中,全局人脸检测过程可以通过结构复杂且计算量大的深度学习模型实现。例如,对第i帧视频帧的检测过程可以为将第i帧输入训练得到的第一人脸识别模型,得到第i帧的至少一个第一检测框。该第一人脸识别模型用于对输入的图像进行全局人脸检测,得到输入图像的第一检测框。
图2示出本公开实施例的一种第一检测框的示意图。如图2所示,对于关键帧20,进行全局人脸检测可以得到其中包括的人脸对应的第一检测框21,该第一检测框21中包括人脸,用于表征人脸在关键帧中的位置。
在本公开的一些实施例中,在得到第i帧的至少一个第一检测框后,电子设备确定第i帧的每个第一检测框中人脸区域的人脸特征信息。在一些实施例中,该特征提取过程可以为提取第i帧中每个第一检测框中的人脸区域,并分别将每个人脸区域输入训练得到的特征提取模型,通过特征提取模型进行特征提取得到对应的人脸特征信息,人脸特征信息表征对应第一检测框中包括人脸的特征。
步骤S30、调整所述第i帧的至少一个第一检测框得到第i+1帧的第二检测框。
在本公开的一些实施例中,由于视频帧序列为通过短时间内连续对至少一个人物进行多次图像采集得到的,同一个人物会因人物运动在相邻视频帧中存在一定的位置偏移。 由于相邻视频帧的间隔采集时间很短,该位置偏移通常为一个较小的偏移量。因此,可以通过前一帧的人脸位置对下一帧该人脸位置所在区域进行大致定位,再对定位区域进行第二人脸识别得到下一帧中人脸所在位置;这样,能够提高后续确定第i+1帧每个第二检测框中的检测区域的速度。也就是说,可以调整前一帧视频帧中每个所述第一检测框尺寸得到第二检测框,并对每个所述第二检测框中的检测区域进行局部人脸检测,得到至少一个第一检测框。因此,对于视频帧序列中位于第i帧相邻的下一位置的第i+1帧,可以通过调整第i帧的至少一个第一检测框得到第i+1帧的第二检测框。
在本公开的一些实施例中,调整第i帧的至少一个第一检测框得到第i+1帧的第二检测框的过程,可以为根据预设的缩放尺寸对第i帧中的至少一个第一检测框进行缩放,得到第i+1帧的至少一个第二检测框。在一些实施例中,由于相邻位置视频帧中的人物可以向任意方向运动,该缩放过程可以以第一检测框的中心位置为基准,向外扩大第一检测框得到第二检测框。例如,可以以第一检测框的中心位置为基准,将第一检测框向外扩大0.6倍得到第二检测框。
图3示出根据本公开实施例的一种第二检测框的示意图。如图3所示,在通过全局人脸检测后可以得到关键帧20中包括的人脸对应的第一检测框21后,以第一检测框21的中心位置作为基准缩放第一检测框21得到第二检测框22。在一些实施例中,还可以通过提取关键帧20在时序上相邻的下一帧中第二检测框22位置中的检测区域进行局部人脸检测,得到关键帧20下一帧视频帧的一个第一检测框。
步骤S40、获取所述第i+1帧每个所述第二检测框中的检测区域。
在本公开的一些实施例中,电子设备在确定第i+1帧的至少一个第二检测框后,提取第i+1帧中每个第二检测框中的检测区域。第二检测框用于表征第i+1帧中可能存在人脸的检测区域,在一些实施例中,检测区域用于进行局部人脸检测以确定第i+1帧中人脸所在位置。
步骤S50、对所述检测区域进行局部人脸检测,得到第i+1帧中至少一个表征人脸位置的第一检测框,并确定所述第i+1帧每个所述第一检测框中人脸区域的人脸特征信息。
在本公开的一些实施例中,电子设备在确定第i+1帧的多个检测区域后,对每个检测区域进行局部人脸检测,得到第i+1帧中至少一个表征人脸位置的第一检测框,以确定第i+1帧中人脸所在的位置。在一些实施例中,局部人脸检测过程可以通过第二人脸识别模型实现,该第二人脸识别模型复杂度和计算量均小于执行全局人脸检测过程的第一人脸识别模型。也就是说,对于第i+1帧,提取每个第二检测框中的检测区域,并将每个检测区域输入训练得到的第二人脸识别模型,输出第i+1帧的至少一个第一检测框。
在本公开的一些实施例中,在得到第i+1帧的至少一个第一检测框后,电子设备确定第i+1帧的每个第一检测框中人脸区域的人脸特征信息。在一些实施例中,该特征提取过程,可参考上述关于第i帧的特征提取过程。
步骤S60、对比所述第i帧的人脸特征信息和所述第i+1帧的人脸特征信息,得到相同的人脸。
在本公开的一些实施例中,电子设备在得到第i帧和第i+1帧的人脸特征信息后,对比第i帧的人脸特征信息和第i+1帧的人脸特征信息,得到相同的人脸。本公开实施例可以通过计算第i帧的每个人脸特征信息与第i+1帧中每个人脸特征信息的相似度,得到对比结果。其中,人脸特征信息可以通过向量形式表征,相似度的计算方式可以通过直接计算人脸特征信息的欧式距离得到。欧式距离与相似度成反比,距离越小表征相似度越大,可以直接确定距离的倒数为相似度。即对于第i帧中的每个人脸特征信息,依次计算其与第i+1帧中每个人脸特征信息的相似度,并确定相似度最大的两个人脸特征信息匹配。电子设备确定匹配的两个人脸特征信息对应的人脸为相同的人脸。
在本公开的一些实施例中,由于第i+1帧中每一个人脸区域对应的第一检测框基于第 i帧的第一检测框确定,为提高特征信息对比过程的效率,可以直接计算第i帧中每个第一检测框中人脸的人脸特征信息与第i+1帧中对应至少一个第一检测框中人脸的人脸特征信息相似度,并确定相似度最大的两个人脸特征信息匹配。或者,还可以确定相似度大于相似度阈值中相似度最大的两个人脸特征信息匹配,以确定匹配的两个人脸特征信息对应的人脸为相同的人脸。
在本公开的一些实施例中,为降低人脸的漏检以及重复检测的情况,电子设备可以预先将视频帧序列中的预设位置处的视频帧,确定为关键帧。在一些实施例中,电子设备可以对视频帧序列中的每个关键帧进行全局人脸检测确定其中人脸位置,并对视频帧序列中每个非关键帧进行局部人脸检测确定其中的人脸位置。也就是说,对于视频帧序列中其他视频帧,可以先判断视频帧是否为关键帧,再根据判断结果进行对应的人脸检测,得到每个视频帧中表征至少一个人脸位置的第一检测框。在一些实施例中,再提取每一个视频帧第一检测框中人脸区域的人脸特征信息,并与相邻的视频帧进行匹配。
在本公开的一些实施例中,电子设备可以根据第i帧和第i+n帧的位置关系,判断第i+n帧是否为关键帧,n为大于或等于2的整数。可以响应于第i+n帧为关键帧,对第i+n帧进行全局人脸检测,得到第i+n帧中至少一个表征人脸位置的第一检测框,并确定第i+n帧每个第一检测框中人脸区域的人脸特征信息。在一些实施例中,对比第i+n-1帧的人脸特征信息和第i+n帧的人脸特征信息,得到相同的人脸。其中,由于第i+n帧为关键帧,第i+n-1帧为非关键帧,即第i+n-1帧进行的是局部人脸检测。在一些实施例中,对第i+n帧进行全局人脸检测的过程与第i帧的全局人脸检测过程相似,第i+n-1帧的人脸特征信息与第i+n帧人脸特征信息的对比过程与第i帧和第i+1帧的人脸特征信息对比过程相似。
在本公开的一些实施例中,电子设备还可以响应于第i+n帧为非关键帧,调整第i+n-1帧的至少一个第一检测框得到第i+n帧的第二检测框。获取第i+n帧每个第二检测框中的检测区域。对检测区域进行局部人脸检测,得到第i+n帧中至少一个表征人脸位置的第一检测框,并确定第i+n帧每个第一检测框中人脸区域的人脸特征信息。对比第i+n-1帧的人脸特征信息和第i+n帧的人脸特征信息,得到相同的人脸,其中,由于第i+n帧为关键帧,第i+n-1帧可以为非关键帧或者关键帧,第i+n-1帧进行的是局部人脸检测或全局人脸检测。在一些实施例中,调整第i+n-1帧的至少一个第一检测框得到第i+n帧的第二检测框的过程,可参考上述关于调整第i帧的至少一个第一检测框得到第i+1帧的第二检测框的过程。同时,对第i+n帧进行局部人脸检测的过程,可参考上述关于第i+1帧的局部人脸检测过程,第i+n-1帧的人脸特征信息与第i+n帧人脸特征信息的对比过程,可参考上述关于第i帧和第i+1帧的人脸特征信息对比过程。
在本公开的一些实施例中,电子设备可以根据间隔周期确定关键帧,使得视频帧序列中每两个相邻的关键帧距离为固定的间隔周期。也就是说,电子设备根据位置关系判断第i+n帧是否为关键帧时,可以响应于第i帧和第i+n帧的位置距离n为间隔周期的整数倍,确定第i+n帧为关键帧。以视频帧序列长度为20为例进行说明。当间隔周期为5,且i为1时,关键帧的位置为第1帧、第6帧、第11帧和第16帧。其他帧为非关键帧。其中,间隔周期可以为预先设定的时间周期,或者根据当前视频帧序列中人脸的运动速度确定。
在间隔期间根据视频帧序列中人脸的运动速度确定时,本公开实施例的人脸跟踪识别方法还可以在确定视频帧序列后,获取视频帧序列中人脸的运动速度,再根据运动速度,确定间隔周期。在一些实施例中,运动速度可以与间隔周期负相关,运动速度越快的情况下确定的间隔周期越短。
在本公开的一些实施例中,电子设备在通过上述方式确定视频帧序列中每一帧与相邻视频帧中相同的人脸后,可以根据视频帧序列中相邻视频帧中的相同人脸确定视频帧序列中相同的人脸,能够实现对视频帧序列中出现过人脸的跟踪识别。
图4示出根据本公开实施例的一种人脸特征信息提取过程的示意图。如图4所示,对 于视频帧序列中的提取得到的视频帧,电子设备按顺序依次获取视频帧40。在获取视频帧40后,确定当前获取的视频帧是否为关键帧41,在当前视频帧为关键帧时直接对当前视频帧进行全局人脸检测42,得到当前视频帧对应的至少一个第一检测框43。同时,在当前视频帧不是关键帧时,根据视频帧序列中位于当前帧前一帧的视频帧对应的每个第一检测框确定一个对应的第二检测框45。提取当前视频帧中每个第二检测框45中的区域得到检测区域46,对检测区域46进行局部人脸检测47,得到当前帧对应的第一检测框43。在一些实施例中,在确定每一个视频帧的第一检测框43后,提取每一个第一检测框43中的区域得到人脸区域44,并将每个人脸区域44输入特征提取模型48得到对应的人脸特征信息49。
基于上述人脸跟踪识别方法,本公开实施例在对视频帧序列进行人脸跟踪识别时,可以对其中部分关键帧进行全局的人脸检测,并通过调整连续视频帧中前一帧的检测框,确定当前帧中人脸检测范围对其他非关键帧进行局部检测。该人脸检测的方式能够减小人脸检测过程所需的算力,提高人脸跟踪识别效率。同时,通过周期性的全局检测提高人脸跟踪识别过程的性能,能够降低人脸的漏检以及重复检测的情况。
可以理解,本公开提及的上述各个方法实施例,在不违背原理逻辑的情况下,均可以彼此相互结合形成结合后的实施例。本领域技术人员可以理解,在具体实施方式的上述方法中,各步骤的具体执行顺序应当以其功能和可能的内在逻辑确定。
此外,本公开还提供了人脸跟踪识别装置、电子设备、计算机可读存储介质、程序,上述均可用来实现本公开提供的任一种人脸跟踪识别方法,相应技术方案和描述和参见方法部分的相应记载。
图5示出根据本公开实施例的一种人脸跟踪识别装置的示意图,如图5所示,本公开实施例的人脸跟踪识别装置50可以包括关键帧确定部分51、第一检测部分52、第一检测框确定部分53、第一区域提取部分54、第二检测部分55和第一匹配部分56,其中:
关键帧确定部分51,被配置为确定视频帧序列中的第i帧作为初始的关键帧,i为大于或等于1的整数;
第一检测部分52,被配置为对所述第i帧进行全局人脸检测,得到第i帧中至少一个表征人脸位置的第一检测框,并确定所述第i帧每个所述第一检测框中人脸区域的人脸特征信息;
第一检测框确定部分53,被配置为调整所述第i帧的至少一个第一检测框得到第i+1帧的第二检测框;
第一区域提取部分54,被配置为获取所述第i+1帧每个所述第二检测框中的检测区域;
第二检测部分55,被配置为对所述检测区域进行局部人脸检测,得到第i+1帧中至少一个表征人脸位置的第一检测框,并确定所述第i+1帧每个所述第一检测框中人脸区域的人脸特征信息;
第一匹配部分56,被配置为对比所述第i帧的人脸特征信息和所述第i+1帧的人脸特征信息,得到相同的人脸。
在本公开的一些实施例中,所述装置还包括:关键帧确定部分,还被配置为根据所述第i帧和第i+n帧的位置关系,判断所述第i+n帧是否为关键帧,n为大于或等于2的整数;第三检测部分,被配置为响应于所述第i+n帧为关键帧,对所述第i+n帧进行全局人脸检测,得到第i+n帧中至少一个表征人脸位置的第一检测框,并确定所述第i+n帧每个所述第一检测框中人脸区域的人脸特征信息;第二匹配部分,被配置为对比第i+n-1帧的人脸特征信息和所述第i+n帧的人脸特征信息,得到相同的人脸,其中,所述第i+n-1帧进行的是局部人脸检测。
在本公开的一些实施例中,所述装置还包括:第二检测框确定部分,被配置为响应于所述第i+n帧为非关键帧,调整第i+n-1帧的至少一个第一检测框得到所述第i+n帧的第 二检测框;第二区域提取部分,被配置为获取所述第i+n帧每个所述第二检测框中的检测区域;第四检测部分,被配置为对所述检测区域进行局部人脸检测,得到第i+n帧中至少一个表征人脸位置的第一检测框,并确定所述第i+n帧每个所述第一检测框中人脸区域的人脸特征信息;第三匹配部分,被配置为对比第i+n-1帧的人脸特征信息和所述第i+n帧的人脸特征信息,得到相同的人脸,其中,所述第i+n-1帧进行的是局部人脸检测或全局人脸检测。
在本公开的一些实施例中,所述关键帧确定部分51,包括:关键帧确定子部分,被配置为响应于所述第i帧和第i+n帧的位置距离n为间隔周期的整数倍,确定所述第i+n帧为关键帧。
在本公开的一些实施例中,所述装置还包括:速度确定部分,被配置为获取所述视频帧序列中人脸的运动速度;周期确定部分,被配置为根据所述运动速度,确定所述间隔周期。
在本公开的一些实施例中,所述第一检测框确定部分53,包括:尺寸缩放子部分,被配置为根据预设的缩放尺寸对所述第i帧中的所述至少一个第一检测框进行缩放,得到所述第i+1帧的至少一个第二检测框。
在本公开的一些实施例中,所述装置还包括:跟踪识别部分,被配置为根据所述视频帧序列中相邻视频帧中的相同人脸确定所述视频帧序列中相同的人脸。
该方法与计算机系统的内部结构存在特定技术关联,且能够解决如何提升硬件运算效率或执行效果的技术问题(包括减少数据存储量、减少数据传输量、提高硬件处理速度等),从而获得符合自然规律的计算机系统内部性能改进的技术效果。
在一些实施例中,本公开实施例提供的装置具有的功能或包含的部分可以用于执行上文方法实施例描述的方法,其具体实现可以参照上文方法实施例的描述。
本公开实施例还提出一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现上述任一实施例提供的人脸跟踪识别方法;其中,计算机可读存储介质可以是易失性或非易失性计算机可读存储介质。
本公开实施例还提出一种电子设备,包括:处理器;用于存储处理器可执行指令的存储器;其中,所述处理器被配置为调用所述存储器存储的指令,以执行上述任一实施例提供的人脸跟踪识别方法。
本公开实施例还提供一种计算机程序,所述计算机程序包括计算机可读代码,在所述计算机可读代码在电子设备中运行的情况下,所述电子设备的处理器执行时用于实现任一实施例提供的人脸跟踪识别方法。
本公开实施例还提供了一种计算机程序产品,包括计算机可读代码,或者承载有计算机可读代码的非易失性计算机可读存储介质,当所述计算机可读代码在电子设备的处理器中运行时,所述电子设备中的处理器执行上述任一实施例提供的人脸跟踪识别方法。
电子设备可以被提供为终端、服务器或其它形态的设备。
图6示出根据本公开实施例的一种电子设备800的示意图。例如,电子设备800可以是UE、移动设备、用户终端、终端、蜂窝电话、无绳电话、PDA、手持设备、计算设备、车载设备、可穿戴设备等终端设备。
参照图6,电子设备800可以包括以下一个或多个组件:处理组件802,存储器804,电源组件806,多媒体组件808,音频组件810,输入/输出(Input/Output,I/O)接口812,传感器组件814,以及通信组件816。
处理组件802通常控制电子设备800的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理组件802可以包括一个或多个处理器820来执行指令,以完成上述的方法的全部或部分步骤。此外,处理组件802可以包括一个或多个模块,便于处理组件802和其他组件之间的交互。例如,处理组件802可以包括多媒体模块, 以方便多媒体组件808和处理组件802之间的交互。
存储器804被配置为存储各种类型的数据以支持在电子设备800的操作。这些数据的示例包括用于在电子设备800上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。存储器804可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(Static Random-Access Memory,SRAM),电可擦除可编程只读存储器(Electrically Erasable Programmable Read Only Memory,EEPROM),可擦除可编程只读存储器(Electrical Programmable Read Only Memory,EPROM),可编程只读存储器(Programmable Read-Only Memory,PROM),只读存储器(Read Only Memory,ROM),磁存储器,快闪存储器,磁盘或光盘。
电源组件806为电子设备800的各种组件提供电力。电源组件806可以包括电源管理系统,一个或多个电源,及其他与为电子设备800生成、管理和分配电力相关联的组件。
多媒体组件808包括在所述电子设备800和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(Liquid Crystal Display,LCD)和触摸面板(TouchPanel,TP)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。所述触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与所述触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件808包括一个前置摄像头和/或后置摄像头。当电子设备800处于操作模式,如拍摄模式或视频模式时,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和后置摄像头可以是一个固定的光学透镜系统或具有焦距和光学变焦能力。
音频组件810被配置为输出和/或输入音频信号。例如,音频组件810包括一个麦克风(Microphone,MIC),当电子设备800处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。在一些实施例中,所接收的音频信号可以被存储在存储器804或经由通信组件816发送。在一些实施例中,音频组件810还包括一个扬声器,用于输出音频信号。
I/O接口812为处理组件802和外围接口模块之间提供接口,上述外围接口模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。
传感器组件814包括一个或多个传感器,用于为电子设备800提供各个方面的状态评估。例如,传感器组件814可以检测到电子设备800的打开/关闭状态,组件的相对定位,例如所述组件为电子设备800的显示器和小键盘,传感器组件814还可以检测电子设备800或电子设备800一个组件的位置改变,用户与电子设备800接触的存在或不存在,电子设备800方位或加速/减速和电子设备800的温度变化。传感器组件814可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件814还可以包括光传感器,如互补金属氧化物半导体(Complementary Metal Oxide Semiconductor,CMOS)或电荷耦合装置(Charge-coupled Device,CCD)图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件814还可以包括加速度传感器,陀螺仪传感器,磁传感器,压力传感器或温度传感器。
通信组件816被配置为便于电子设备800和其他设备之间有线或无线方式的通信。电子设备800可以接入基于通信标准的无线网络,如无线网络(Wi-Fi)、第二代移动通信技术(2-Generation,2G)、第三代移动通信技术(3-Generation,3G)、第四代移动通信技术(The 4th Generation Mobile Communication Technology,4G)、通用移动通信技术的长期演进(Long Term Evolution,LTE)、第五代移动通信技术((5th Generation Mobile Communication Technology,5G)或它们的组合。在一个示例性实施例中,通信组件816经由广播信道接收来自外部广播管理系统的广播信号或广播相关信息。在一个示例性实 施例中,所述通信组件816还包括近场通信(Near Field Communication,NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(Radio Frequency Identification,RFID)技术,红外数据协会(Infrared Data Association,IrDA)技术,超宽带(Ultra Wide Band,UWB)技术,蓝牙(BitTorrent,BT)技术和其他技术来实现。
在示例性实施例中,电子设备800可以被一个或多个应用专用集成电路(Application Specific Integrated Circuit,ASIC)、数字信号处理器(Digital Signal Processor,DSP)、数字信号处理设备(Digital Signal Processor Device,DSPD)、可编程逻辑器件(Programmaile Lofic Device,PLD)、现场可编程门阵列(Field Programmable Gate Array,FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述方法。
在示例性实施例中,还提供了一种非易失性计算机可读存储介质,例如包括计算机程序指令的存储器804,上述计算机程序指令可由电子设备800的处理器820执行以完成上述任一实施例提供的人脸跟踪识别方法。
本公开涉及增强现实领域,通过获取现实环境中的目标对象的图像信息,进而借助各类视觉相关算法实现对目标对象的相关特征、状态及属性进行检测或识别处理,从而得到与具体应用匹配的虚拟与现实相结合的AR效果。示例性的,目标对象可涉及与人体相关的脸部、肢体、手势、动作等,或者与物体相关的标识物、标志物,或者与场馆或场所相关的沙盘、展示区域或展示物品等。视觉相关算法可涉及视觉定位、SLAM、三维重建、图像注册、背景分割、对象的关键点提取及跟踪、对象的位姿或深度检测等。具体应用不仅可以涉及跟真实场景或物品相关的导览、导航、讲解、重建、虚拟效果叠加展示等交互场景,还可以涉及与人相关的特效处理,比如妆容美化、肢体美化、特效展示、虚拟模型展示等交互场景。可通过卷积神经网络,实现对目标对象的相关特征、状态及属性进行检测或识别处理。上述卷积神经网络是基于深度学习框架进行模型训练而得到的网络模型。
图7示出根据本公开实施例的另一种电子设备1900的示意图。例如,电子设备1900可以被提供为一服务器或终端设备。参照图7,电子设备1900包括处理组件1922,在一些实施例中,电子设备1900包括一个或多个处理器,以及由存储器1932所代表的存储器资源,用于存储可由处理组件1922的执行的指令,例如应用程序。存储器1932中存储的应用程序可以包括一个或一个以上的每一个对应于一组指令的模块。此外,处理组件1922被配置为执行指令,以执行上述方法。
电子设备1900还可以包括一个电源组件1926被配置为执行电子设备1900的电源管理,一个有线或无线网络接口1950被配置为将电子设备1900连接到网络,和I/O接口1958。电子设备1900可以操作基于存储在存储器1932的操作系统,例如微软服务器操作系统(Windows ServerTM),苹果公司推出的基于图形用户界面操作系统(Mac OS XTM),多用户多进程的计算机操作系统(UnixTM),自由和开放原代码的类Unix操作系统(LinuxTM),开放原代码的类Unix操作系统(FreeBSDTM)或类似。
在示例性实施例中,还提供了一种非易失性计算机可读存储介质,例如包括计算机程序指令的存储器1932,上述计算机程序指令可由电子设备1900的处理组件1922执行以完成上述方法。
本公开可以是系统、方法和/或计算机程序产品。计算机程序产品可以包括计算机可读存储介质,其上载有用于使处理器实现本公开的各个方面的计算机可读程序指令。
计算机可读存储介质可以是可以保持和存储由指令执行设备使用的指令的有形设备。计算机可读存储介质例如可以是(但不限于)电存储设备、磁存储设备、光存储设备、电磁存储设备、半导体存储设备或者上述的任意合适的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:便携式计算机盘、硬盘、随机存取存储器(Random Access Memory,RAM)、ROM、EPROM或闪存、SRAM、便携式压缩盘只读存储器 (Compact Disc-Read Only Memory,CD-ROM)、数字多功能盘(Digital Versatile Disc,DVD)、记忆棒、软盘、机械编码设备、例如其上存储有指令的打孔卡或凹槽内凸起结构、以及上述的任意合适的组合。这里所使用的计算机可读存储介质不被解释为瞬时信号本身,诸如无线电波或者其他自由传播的电磁波、通过波导或其他传输媒介传播的电磁波(例如,通过光纤电缆的光脉冲)、或者通过电线传输的电信号。
这里所描述的计算机可读程序指令可以从计算机可读存储介质下载到各个计算/处理设备,或者通过网络、例如因特网、局域网、广域网和/或无线网下载到外部计算机或外部存储设备。网络可以包括铜传输电缆、光纤传输、无线传输、路由器、防火墙、交换机、网关计算机和/或边缘服务器。每个计算/处理设备中的网络适配卡或者网络接口从网络接收计算机可读程序指令,并转发该计算机可读程序指令,以供存储在各个计算/处理设备中的计算机可读存储介质中。
用于执行本公开实施例操作的计算机程序指令可以是汇编指令、指令集架构(Instruction Set Architecture,ISA)指令、机器指令、机器相关指令、微代码、固件指令、状态设置数据、或者以一种或多种编程语言的任意组合编写的源代码或目标代码,所述编程语言包括面向对象的编程语言,诸如Smalltalk、C++等,以及常规的过程式编程语言,诸如“C”语言或类似的编程语言。计算机可读程序指令可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络,包括局域网(Local Area Network,LAN)或广域网(Wide Area Network,WAN),连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。在一些实施例中,通过利用计算机可读程序指令的状态信息来个性化定制电子电路,例如可编程逻辑电路、FPGA或可编程逻辑阵列(Programmable Logic Arrays,PLA),该电子电路可以执行计算机可读程序指令,从而实现本公开的各个方面。
这里参照根据本公开实施例的方法、装置(系统)和计算机程序产品的流程图和/或框图描述了本公开的各个方面。应当理解,流程图和/或框图的每个方框以及流程图和/或框图中各方框的组合,都可以由计算机可读程序指令实现。
这些计算机可读程序指令可以提供给通用计算机、专用计算机或其它可编程数据处理装置的处理器,从而生产出一种机器,使得这些指令在通过计算机或其它可编程数据处理装置的处理器执行时,产生了实现流程图和/或框图中的一个或多个方框中规定的功能/动作的装置。也可以把这些计算机可读程序指令存储在计算机可读存储介质中,这些指令使得计算机、可编程数据处理装置和/或其他设备以特定方式工作,从而,存储有指令的计算机可读介质则包括一个制造品,其包括实现流程图和/或框图中的一个或多个方框中规定的功能/动作的各个方面的指令。
也可以把计算机可读程序指令加载到计算机、其它可编程数据处理装置、或其它设备上,使得在计算机、其它可编程数据处理装置或其它设备上执行一系列操作步骤,以产生计算机实现的过程,从而使得在计算机、其它可编程数据处理装置、或其它设备上执行的指令实现流程图和/或框图中的一个或多个方框中规定的功能/动作。
附图中的流程图和框图显示了根据本公开的多个实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或指令的一部分,所述模块、程序段或指令的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执 行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
该计算机程序产品可以具体通过硬件、软件或其结合的方式实现。在一个可选实施例中,所述计算机程序产品具体体现为计算机存储介质,在另一个可选实施例中,计算机程序产品具体体现为软件产品,例如软件开发包(Software Development Kit,SDK)等等。
上文对各个实施例的描述倾向于强调各个实施例之间的不同之处,其相同或相似之处可以互相参考,为了简洁,本文不再赘述。
本领域技术人员可以理解,在具体实施方式的上述方法中,各步骤的撰写顺序并不意味着严格的执行顺序而对实施过程构成任何限定,各步骤的具体执行顺序应当以其功能和可能的内在逻辑确定。
若本公开实施例技术方案涉及个人信息,应用本公开实施例技术方案的产品在处理个人信息前,已明确告知个人信息处理规则,并取得个人自主同意。若本公开实施例技术方案涉及敏感个人信息,应用本公开实施例技术方案的产品在处理敏感个人信息前,已取得个人单独同意,并且同时满足“明示同意”的要求。例如,在摄像头等个人信息采集装置处,设置明确显著的标识告知已进入个人信息采集范围,将会对个人信息进行采集,若个人自愿进入采集范围即视为同意对其个人信息进行采集;或者在个人信息处理的装置上,利用明显的标识/信息告知个人信息处理规则的情况下,通过弹窗信息或请个人自行上传其个人信息等方式获得个人授权;其中,个人信息处理规则可包括个人信息处理者、个人信息处理目的、处理方式以及处理的个人信息种类等信息。
以上已经描述了本公开的各实施例,上述说明是示例性的,并非穷尽性的,并且也不限于所披露的各实施例。在不偏离所说明的各实施例的范围和精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。本文中所用术语的选择,旨在最好地解释各实施例的原理、实际应用或对市场中的技术的改进,或者使本技术领域的其它普通技术人员能理解本文披露的各实施例。
工业实用性
本公开实施例涉及一种人脸跟踪识别方法、装置、电子设备、介质及程序产品,确定视频帧序列中的第i帧作为初始的关键帧;对第i帧进行全局人脸检测得到其中至少一个表征人脸位置的第一检测框以及每个第一检测框中人脸区域的人脸特征信息;调整第i帧的至少一个第一检测框得到第i+1帧的第二检测框;获取第i+1帧每个第二检测框中的检测区域进行局部人脸检测得到其中至少一个表征人脸位置的第一检测框以及每个第一检测框中人脸区域的人脸特征信息;对比第i帧的人脸特征信息和第i+1帧的人脸特征信息,得到相同的人脸。

Claims (18)

  1. 一种人脸跟踪识别方法,所述方法包括:
    确定视频帧序列中的第i帧作为初始的关键帧,i为大于或等于1的整数;
    对所述第i帧进行全局人脸检测,得到所述第i帧中至少一个表征人脸位置的第一检测框,并确定所述第i帧每个所述第一检测框中人脸区域的人脸特征信息;
    调整所述第i帧的至少一个第一检测框得到第i+1帧的第二检测框;
    获取所述第i+1帧每个所述第二检测框中的检测区域;
    对所述检测区域进行局部人脸检测,得到所述第i+1帧中至少一个表征人脸位置的第一检测框,并确定所述第i+1帧每个所述第一检测框中人脸区域的人脸特征信息;
    对比所述第i帧的人脸特征信息和所述第i+1帧的人脸特征信息,得到相同的人脸。
  2. 根据权利要求1所述的方法,其中,所述方法还包括:
    根据所述第i帧和第i+n帧的位置关系,判断所述第i+n帧是否为关键帧,n为大于或等于2的整数;
    响应于所述第i+n帧为关键帧,对所述第i+n帧进行全局人脸检测,得到所述第i+n帧中至少一个表征人脸位置的第一检测框,并确定所述第i+n帧每个所述第一检测框中人脸区域的人脸特征信息;
    对比第i+n-1帧的人脸特征信息和所述第i+n帧的人脸特征信息,得到相同的人脸,其中,所述第i+n-1帧进行的是局部人脸检测。
  3. 根据权利要求2所述的方法,其中,所述方法还包括:
    响应于所述第i+n帧为非关键帧,调整第所述i+n-1帧的至少一个第一检测框得到所述第i+n帧的第二检测框;
    获取所述第i+n帧每个所述第二检测框中的检测区域;
    对所述检测区域进行局部人脸检测,得到第i+n帧中至少一个表征人脸位置的第一检测框,并确定所述第i+n帧每个所述第一检测框中人脸区域的人脸特征信息;
    对比第i+n-1帧的人脸特征信息和所述第i+n帧的人脸特征信息,得到相同的人脸,其中,所述第i+n-1帧进行的是局部人脸检测或全局人脸检测。
  4. 根据权利要求2或3所述的方法,其中,所述根据所述第i帧和第i+n帧的位置关系,判断所述第i+n帧是否为关键帧,包括:
    响应于所述第i帧和第i+n帧的位置距离n为间隔周期的整数倍,确定所述第i+n帧为关键帧。
  5. 根据权利要求4所述的方法,其中,所述方法还包括:
    获取所述视频帧序列中人脸的运动速度;
    根据所述运动速度,确定所述间隔周期。
  6. 根据权利要求1至5中任意一项所述的方法,其中,所述调整所述第i帧的至少一个第一检测框得到第i+1帧的第二检测框,包括:
    根据预设的缩放尺寸对所述第i帧中的所述至少一个第一检测框进行缩放,得到所述第i+1帧的至少一个第二检测框。
  7. 根据权利要求2至6中任意一项所述的方法,其中,所述方法还包括:
    根据所述视频帧序列中相邻视频帧中的相同人脸确定所述视频帧序列中相同的人脸。
  8. 一种人脸跟踪识别装置,所述装置包括:
    关键帧确定部分,被配置为确定视频帧序列中的第i帧作为初始的关键帧,i为大于或等于1的整数;
    第一检测部分,被配置为对所述第i帧进行全局人脸检测,得到第i帧中至少一个表征人脸位置的第一检测框,并确定所述第i帧每个所述第一检测框中人脸区域的人脸特征信 息;
    第一检测框确定部分,被配置为调整所述第i帧的至少一个第一检测框得到第i+1帧的第二检测框;
    第一区域提取部分,被配置为获取所述第i+1帧每个所述第二检测框中的检测区域;
    第二检测部分,被配置为对所述检测区域进行局部人脸检测,得到第i+1帧中至少一个表征人脸位置的第一检测框,并确定所述第i+1帧每个所述第一检测框中人脸区域的人脸特征信息;
    第一匹配部分,被配置为对比所述第i帧的人脸特征信息和所述第i+1帧的人脸特征信息,得到相同的人脸。
  9. 根据权利要求8所述的装置,其中,所述装置还包括:
    所述关键帧确定部分,还被配置为根据所述第i帧和第i+n帧的位置关系,判断所述第i+n帧是否为关键帧,n为大于或等于2的整数;
    第三检测部分,被配置为响应于所述第i+n帧为关键帧,对所述第i+n帧进行全局人脸检测,得到所述第i+n帧中至少一个表征人脸位置的第一检测框,并确定所述第i+n帧每个所述第一检测框中人脸区域的人脸特征信息;
    第二匹配部分,被配置为对比第i+n-1帧的人脸特征信息和所述第i+n帧的人脸特征信息,得到相同的人脸,其中,所述第i+n-1帧进行的是局部人脸检测。
  10. 根据权利要求9所述的装置,其中,所述装置还包括:
    第二检测框确定部分,被配置为响应于所述第i+n帧为非关键帧,调整第所述i+n-1帧的至少一个第一检测框得到所述第i+n帧的第二检测框;
    第二区域提取部分,被配置为获取所述第i+n帧每个所述第二检测框中的检测区域;
    第四检测部分,被配置为对所述检测区域进行局部人脸检测,得到第i+n帧中至少一个表征人脸位置的第一检测框,并确定所述第i+n帧每个所述第一检测框中人脸区域的人脸特征信息;
    第三匹配部分,被配置为对比第i+n-1帧的人脸特征信息和所述第i+n帧的人脸特征信息,得到相同的人脸,其中,所述第i+n-1帧进行的是局部人脸检测或全局人脸检测。
  11. 根据权利要求9或10所述的装置,其中,所述关键帧确定部分,包括:
    关键帧确定子部分,被配置为响应于所述第i帧和第i+n帧的位置距离n为间隔周期的整数倍,确定所述第i+n帧为关键帧。
  12. 根据权利要求11所述的装置,其中,所述装置还包括:
    速度确定部分,被配置为获取所述视频帧序列中人脸的运动速度;
    周期确定部分,被配置为根据所述运动速度,确定所述间隔周期。
  13. 根据权利要求8至12中任意一项所述的装置,其中,所述第一检测框确定部分,包括:
    尺寸缩放子部分,被配置为根据预设的缩放尺寸对所述第i帧中的所述至少一个第一检测框进行缩放,得到所述第i+1帧的至少一个第二检测框。
  14. 根据权利要求8至13中任意一项所述的装置,其中,所述装置还包括:
    跟踪识别部分,被配置为根据所述视频帧序列中相邻视频帧中的相同人脸确定所述视频帧序列中相同的人脸。
  15. 一种电子设备,包括:
    处理器;
    用于存储处理器可执行指令的存储器;
    其中,所述处理器被配置为调用所述存储器存储的指令,以执行权利要求1至7中任意一项所述的人脸跟踪识别方法。
  16. 一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令 被处理器执行时实现权利要求1至7中任意一项所述的人脸跟踪识别方法。
  17. 一种计算机程序,所述计算机程序包括计算机可读代码,在所述计算机可读代码在电子设备中运行的情况下,所述电子设备的处理器执行时用于实现如权利要求1至7任一所述的人脸跟踪识别方法。
  18. 一种计算机程序产品,所述计算机程序产品包括计算机可读代码,或者承载所述计算机可读代码的非易失性计算机可读存储介质,在所述计算机可读代码在电子设备的处理器中运行时,所述电子设备中的处理器执行时实现如权利要求1至7中任意一项所述的人脸跟踪识别方法。
PCT/CN2022/110287 2022-01-29 2022-08-04 人脸跟踪识别方法、装置、电子设备、介质及程序产品 WO2023142419A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210112707.6A CN114445753A (zh) 2022-01-29 2022-01-29 人脸跟踪识别方法及装置、电子设备和存储介质
CN202210112707.6 2022-01-29

Publications (1)

Publication Number Publication Date
WO2023142419A1 true WO2023142419A1 (zh) 2023-08-03

Family

ID=81371238

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/110287 WO2023142419A1 (zh) 2022-01-29 2022-08-04 人脸跟踪识别方法、装置、电子设备、介质及程序产品

Country Status (2)

Country Link
CN (1) CN114445753A (zh)
WO (1) WO2023142419A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117437678A (zh) * 2023-11-01 2024-01-23 烟台持久钟表有限公司 正面人脸持续时间统计方法、系统、装置、存储介质

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114445753A (zh) * 2022-01-29 2022-05-06 成都商汤科技有限公司 人脸跟踪识别方法及装置、电子设备和存储介质

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106650682A (zh) * 2016-12-29 2017-05-10 Tcl集团股份有限公司 一种人脸追踪的方法及装置
CN106778482A (zh) * 2016-11-15 2017-05-31 东软集团股份有限公司 人脸追踪方法及装置
WO2018170864A1 (zh) * 2017-03-20 2018-09-27 成都通甲优博科技有限责任公司 一种人脸识别跟踪方法
CN109344789A (zh) * 2018-10-16 2019-02-15 北京旷视科技有限公司 人脸跟踪方法及装置
CN113177526A (zh) * 2021-05-27 2021-07-27 中国平安人寿保险股份有限公司 基于人脸识别的图像处理方法、装置、设备及存储介质
CN113284167A (zh) * 2021-05-28 2021-08-20 深圳数联天下智能科技有限公司 人脸跟踪检测方法、装置、设备和介质
CN114445753A (zh) * 2022-01-29 2022-05-06 成都商汤科技有限公司 人脸跟踪识别方法及装置、电子设备和存储介质

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106778482A (zh) * 2016-11-15 2017-05-31 东软集团股份有限公司 人脸追踪方法及装置
CN106650682A (zh) * 2016-12-29 2017-05-10 Tcl集团股份有限公司 一种人脸追踪的方法及装置
WO2018170864A1 (zh) * 2017-03-20 2018-09-27 成都通甲优博科技有限责任公司 一种人脸识别跟踪方法
CN109344789A (zh) * 2018-10-16 2019-02-15 北京旷视科技有限公司 人脸跟踪方法及装置
CN113177526A (zh) * 2021-05-27 2021-07-27 中国平安人寿保险股份有限公司 基于人脸识别的图像处理方法、装置、设备及存储介质
CN113284167A (zh) * 2021-05-28 2021-08-20 深圳数联天下智能科技有限公司 人脸跟踪检测方法、装置、设备和介质
CN114445753A (zh) * 2022-01-29 2022-05-06 成都商汤科技有限公司 人脸跟踪识别方法及装置、电子设备和存储介质

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117437678A (zh) * 2023-11-01 2024-01-23 烟台持久钟表有限公司 正面人脸持续时间统计方法、系统、装置、存储介质

Also Published As

Publication number Publication date
CN114445753A (zh) 2022-05-06

Similar Documents

Publication Publication Date Title
CN109740516B (zh) 一种用户识别方法、装置、电子设备及存储介质
CN111310616B (zh) 图像处理方法及装置、电子设备和存储介质
JP7106687B2 (ja) 画像生成方法および装置、電子機器、並びに記憶媒体
WO2023142419A1 (zh) 人脸跟踪识别方法、装置、电子设备、介质及程序产品
CN107492115B (zh) 目标对象的检测方法及装置
EP3996379A1 (en) Video cover determining method and device, and storage medium
US20210279892A1 (en) Image processing method and device, and network training method and device
US20210287009A1 (en) Video processing method, video processing device, and storage medium
WO2022099989A1 (zh) 活体识别、门禁设备控制方法和装置、电子设备和存储介质、计算机程序
CN109325908B (zh) 图像处理方法及装置、电子设备和存储介质
JP2022533065A (ja) 文字認識方法及び装置、電子機器並びに記憶媒体
CN109685041B (zh) 图像分析方法及装置、电子设备和存储介质
CN112597944B (zh) 关键点检测方法及装置、电子设备和存储介质
WO2023024791A1 (zh) 帧率调整方法、装置、电子设备、存储介质及程序
WO2023165082A1 (zh) 图像预览方法、装置、电子设备、存储介质及计算机程序及其产品
WO2023168957A1 (zh) 姿态确定方法、装置、电子设备、存储介质及程序
CN110135349A (zh) 识别方法、装置、设备及存储介质
CN114332503A (zh) 对象重识别方法及装置、电子设备和存储介质
WO2022247091A1 (zh) 人群定位方法及装置、电子设备和存储介质
WO2023094894A1 (zh) 目标跟踪、事件检测方法及装置、电子设备和存储介质
WO2023173659A1 (zh) 人脸匹配方法及装置、电子设备、存储介质、计算机程序产品及计算机程序
CN110110742B (zh) 多特征融合方法、装置、电子设备及存储介质
CN113837933A (zh) 网络训练及图像生成方法、装置、电子设备和存储介质
CN115035440A (zh) 时序动作提名的生成方法及装置、电子设备和存储介质
CN115422932A (zh) 一种词向量训练方法及装置、电子设备和存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22923223

Country of ref document: EP

Kind code of ref document: A1