CN111258669B - Face recognition method and device and storage medium - Google Patents

Face recognition method and device and storage medium Download PDF

Info

Publication number
CN111258669B
CN111258669B CN202010217617.4A CN202010217617A CN111258669B CN 111258669 B CN111258669 B CN 111258669B CN 202010217617 A CN202010217617 A CN 202010217617A CN 111258669 B CN111258669 B CN 111258669B
Authority
CN
China
Prior art keywords
face recognition
image
sub
frame
operating system
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
CN202010217617.4A
Other languages
Chinese (zh)
Other versions
CN111258669A (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.)
Shanghai Sensetime Lingang Intelligent Technology Co Ltd
Original Assignee
Shanghai Sensetime Lingang Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Sensetime Lingang Intelligent Technology Co Ltd filed Critical Shanghai Sensetime Lingang Intelligent Technology Co Ltd
Priority to CN202010217617.4A priority Critical patent/CN111258669B/en
Publication of CN111258669A publication Critical patent/CN111258669A/en
Application granted granted Critical
Publication of CN111258669B publication Critical patent/CN111258669B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4406Loading of operating system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/161Detection; Localisation; Normalisation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Human Computer Interaction (AREA)
  • Multimedia (AREA)
  • Studio Devices (AREA)
  • Image Analysis (AREA)
  • Collating Specific Patterns (AREA)

Abstract

The disclosure provides a face recognition method and device and a storage medium, wherein operating system initialization comprises first process initialization and second process initialization, and the method comprises the following steps: initializing the first process, acquiring at least one frame of image through the first process, and carrying out face recognition on the at least one frame of image to obtain a face recognition result; and after the face recognition result is obtained, initializing the second process.

Description

Face recognition method and device and storage medium
Technical Field
The disclosure relates to the field of face recognition, and in particular relates to a face recognition method and device and a storage medium.
Background
At present, the scheme for carrying out face recognition in the android operating system is carried out through an application layer of the android operating system.
In practical application, face recognition can be performed through an application layer only after initialization of the android operating system is completed. Because the initialization of the android operating system comprises the initialization of a plurality of processes, the initialization process of the android operating system is slow, and the human face recognition time is long.
Disclosure of Invention
The disclosure provides a face recognition method and device and a storage medium.
According to a first aspect of an embodiment of the present disclosure, there is provided a face recognition method, the operating system initialization including a first process initialization and a second process initialization, the method including: initializing the first process, acquiring at least one frame of image through the first process, and carrying out face recognition on the at least one frame of image to obtain a face recognition result; and after the face recognition result is obtained, initializing the second process.
In some alternative embodiments, the first process comprises a framework service process and the second process comprises a virtual machine process.
In some optional embodiments, the acquiring, by the first process, at least one frame of image includes: and starting an image acquisition device through the first process, and acquiring the at least one frame of image.
In some alternative embodiments, the method further comprises: and initializing a service corresponding to the image acquisition equipment in the process of initializing the first process.
In some alternative embodiments, the first process includes a first sub-process and a second sub-process; acquiring at least one frame of image through the first process, and performing face recognition on the at least one frame of image to obtain a face recognition result, wherein the face recognition result comprises the following steps: acquiring the at least one frame of image through the first subprocess, and sending the at least one frame of image to the second subprocess; and obtaining the face recognition result according to the at least one frame of image through the second subprocess.
In some optional embodiments, after the face recognition result is obtained, the method further includes: and releasing at least part of resources occupied by the second sub-process.
In some alternative embodiments, the method further comprises: if the face recognition result is that the target face is recognized, after the operating system completes initialization, the face recognition result is sent to an application layer; and adjusting target equipment according to the configuration data corresponding to the target face through the application layer.
In some alternative embodiments, the first sub-process is pre-added in the first process or multiplexes existing sub-processes in the first process; and/or the second sub-process is added in the first process in advance or is multiplexed with the existing sub-process in the first process.
In some optional embodiments, when the operating system is a vehicle-mounted operating system, the vehicle-mounted operating system includes a reversing image module, a service corresponding to the first subprocess is integrated in a driving service of the reversing image module, and a calling service of the vehicle-mounted camera and a service corresponding to the second subprocess are integrated in a reversing application service of the reversing image module; the vehicle-mounted camera is used for collecting at least one frame of image comprising a vehicle cabin driver.
According to a second aspect of the embodiments of the present disclosure, there is provided a face recognition apparatus, the operating system initialization including a first process initialization and a second process initialization, the apparatus comprising: the face recognition module is used for initializing the first process, acquiring at least one frame of image through the first process, and recognizing the face of the at least one frame of image to obtain a face recognition result; and the first initialization module is used for starting the initialization of the second process after the face recognition result is obtained.
In some alternative embodiments, the first process comprises a framework service process and the second process comprises a virtual machine process.
In some alternative embodiments, the face recognition module includes: and the acquisition sub-module is used for starting the image acquisition equipment through the first process and acquiring the at least one frame of image.
In some alternative embodiments, the apparatus further comprises: and the second initialization module is used for initializing the service corresponding to the image acquisition equipment in the process of initializing the first process.
In some alternative embodiments, the first process includes a first sub-process and a second sub-process; the face recognition module comprises: the execution sub-module is used for acquiring the at least one frame of image through the first sub-process and sending the at least one frame of image to the second sub-process; and the face recognition sub-module is used for obtaining the face recognition result according to the at least one frame of image through the second sub-process.
In some alternative embodiments, the apparatus further comprises: and the resource release module is used for releasing at least part of resources occupied by the second sub-process.
In some alternative embodiments, the apparatus further comprises: the generation module is used for sending the face recognition result to an application layer after the operation system completes initialization if the face recognition result is the target face recognition; and the device adjusting module is used for adjusting the target device according to the configuration data corresponding to the target face through the application layer.
In some alternative embodiments, the first sub-process is pre-added in the first process or multiplexes existing sub-processes in the first process; and/or the second sub-process is added in the first process in advance or is multiplexed with the existing sub-process in the first process.
In some optional embodiments, when the operating system is a vehicle-mounted operating system, the vehicle-mounted operating system includes a reversing image module, a service corresponding to the first subprocess is integrated in a driving service of the reversing image module, and a calling service of the vehicle-mounted camera and a service corresponding to the second subprocess are integrated in a reversing application service of the reversing image module; the vehicle-mounted camera is used for collecting at least one frame of image comprising a vehicle cabin driver.
According to a third aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium storing a computer program for executing the face recognition method according to any one of the above first aspects.
According to a fourth aspect of embodiments of the present disclosure, there is provided a face recognition apparatus, including: a processor; a memory for storing the processor-executable instructions; wherein the processor is configured to invoke the executable instructions stored in the memory to implement the face recognition method of any of the first aspects.
The technical scheme provided by the embodiment of the disclosure can comprise the following beneficial effects:
In the embodiment of the disclosure, the process of initializing the operating system includes a first process initialization and a second process initialization, the first process is initialized, at least one frame of image is obtained through the first process, and face recognition is performed on the at least one frame of image to obtain a face recognition result. After the face recognition result is obtained, the initialization of the second process is started. The method and the device can conduct face recognition in the initialization process of the operating system, can determine the face recognition result without waiting for the end of the initialization process of the operating system, and shorten the time for obtaining the face recognition result.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure.
FIG. 1 is an operating system initialization flow diagram according to an exemplary embodiment of the present disclosure;
FIG. 2 is a flowchart of a face recognition method according to an exemplary embodiment of the present disclosure;
FIG. 3 is a flowchart of another face recognition method according to an exemplary embodiment of the present disclosure;
FIG. 4 is a flowchart of another face recognition method illustrated by the present disclosure according to an exemplary embodiment;
FIG. 5 is a flowchart of another face recognition method according to an exemplary embodiment of the present disclosure;
fig. 6 is a flowchart of another face recognition method according to an exemplary embodiment of the present disclosure;
fig. 7 is a block diagram of a face recognition device according to an exemplary embodiment of the present disclosure;
fig. 8 is a schematic diagram of a structure for a face recognition device according to an exemplary embodiment of the present disclosure.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as detailed in the accompanying claims.
The terminology used in the present disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. As used in this disclosure and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as run herein refers to and encompasses any or all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used in this disclosure to describe various information, these information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present disclosure. Depending on the context, the word "if" as run herein may be interpreted as "at … …" or "at … …" or "in response to a determination".
In the embodiment of the present disclosure, taking an android operating system as an example, an operating system initialization process is introduced. For example, as shown in fig. 1, the android operating system first needs to initialize boot loader (BootLoader). And further initiates initialization of the Linux operating system kernel (Linuxkernel). After the linux kernel initialization is finished, an initialization (init) process is started, and then a c++ layer framework service (framework service) and a java virtual machine (Zygote) process are started. After Zygote processes are initialized, javaframe work service is started, after Javaframe work service is initialized, the whole initialization process of the android operating system is completed, and application of an application layer can be started subsequently. The operating system initialization process described above may run in a central processing unit (Central Processing Unit, CPU).
It can be seen that the operating system initialization process described above involves multiple processes, and the initialization process takes a relatively long time. If the face recognition is required, the operation system needs to wait for the initialization to finish, and the face recognition can be performed through the application layer, so that the face recognition time is long.
The embodiment of the disclosure provides a face recognition method, which can determine a face recognition result before the initialization process of an operating system is finished, so that the face recognition time is shortened. The face recognition method can be used in an operating system, which includes but is not limited to an android operating system, an input-output operating system (Input Output System, IOS), etc., and for convenience of description, the android operating system will be taken as an example in the following embodiments.
For example, as shown in fig. 2, fig. 2 is a face recognition method according to an exemplary embodiment, including the steps of:
in step 101, initializing the first process, acquiring at least one frame of image through the first process, and performing face recognition on the at least one frame of image to obtain a face recognition result.
In the embodiment of the present disclosure, the first process is a process included in the operating system, and in the process of initializing the operating system, the first process needs to be initialized. Wherein the first process comprises a framework service process including, but not limited to, a c++ framework service process. After the first process is initialized, the face recognition result can be obtained through the first process.
In step 102, after the face recognition result is obtained, initialization of the second process is started.
In the embodiment of the disclosure, the second process is also a process included in the operating system, and the second process needs to be initialized in the process of initializing the operating system. In the disclosed embodiments, the second process includes a virtual machine process including, but not limited to, a Java virtual machine process.
Because the time required for initializing the virtual machine process is long, in the embodiment of the present disclosure, the initialization of the second process may be started after the face recognition result is obtained.
In the above embodiment, the process of initializing the operating system includes initializing a first process and initializing a second process, initializing the first process, acquiring at least one frame of image through the first process, and performing face recognition on the at least one frame of image to obtain a face recognition result. After the face recognition result is obtained, the initialization of the second process is started. The method and the device can conduct face recognition in the initialization process of the operating system, can determine the face recognition result without waiting for the end of the initialization process of the operating system, and shorten the time for obtaining the face recognition result.
In some optional embodiments, the acquiring at least one frame of image in step 101 through the first process may include:
And starting an image acquisition device through the first process, and acquiring the at least one frame of image.
In an embodiment of the present disclosure, the image capturing device may include a camera, after the first process is initialized, the camera is started through the first process, so as to capture at least one frame of image, and face recognition is performed on the captured at least one frame of image to obtain a face recognition result.
In some alternative embodiments, such as shown in fig. 3, the method may further include:
In step 103, in the process of initializing the first process, a service corresponding to the image capturing device is initialized.
In an embodiment of the present disclosure, the image capturing device may include a camera, and the corresponding service may include, but is not limited to, a camera service (CAMERA SERVICE), a graphics card driving service (openGL service). In the process of initializing the first process, the operating system may also initialize the service corresponding to the image acquisition device. After the service corresponding to the image acquisition device is initialized, at least one frame of image can be acquired through the image acquisition device so as to facilitate the subsequent face recognition.
In the above embodiment, the service corresponding to the image capturing device may be initialized during the initialization of the first process, and then the at least one frame of image may be captured by the image capturing device. Therefore, the face recognition result can be determined before the initialization of the operating system is finished, and the time for obtaining the face recognition result is shortened.
In some alternative embodiments, the first process includes a first sub-process and a second sub-process. Wherein the first sub-process may provide an interactive interface between the second sub-process and the other processes/sub-processes. The second sub-process may include a face recognition algorithm, which obtains a face recognition result by recognizing the image.
Accordingly, as shown in fig. 4, for example, step 101 may include:
In step 101-1, the at least one frame of image is acquired by the first sub-process, and the at least one frame of image is sent to the second sub-process.
In the embodiment of the disclosure, at least one frame of image acquired by the image acquisition device can be obtained through the first subprocess, and the at least one frame of image is sent to the second subprocess.
In step 101-2, the face recognition result is obtained according to the at least one frame of image through the second sub-process.
In the embodiment of the disclosure, the second sub-process may invoke a face recognition algorithm to perform face detection on at least one frame of image, for example, a deep neural network running in a processor such as a central processing unit (cpu), a graphics processor (Graphics Processing Unit, GPU), or other implementation manners may be adopted to determine a face in at least one frame of image, extract a face feature, and match the extracted face feature with a pre-stored face feature to obtain a face recognition result.
In the above embodiment, at least one frame of image may be acquired through a first sub-process included in the first process, and at least one frame of image may be sent to a second sub-process included in the first process. And carrying out face recognition through a second subprocess to obtain a face recognition result. The purpose of obtaining the face recognition result in the initialization process of the operating system is achieved, and the time for obtaining the face recognition result is shortened.
In some alternative embodiments, when the second sub-process performs face recognition, the pre-stored face features may be face features pre-stored in a file system, for example, the user registers the face features in advance, the registered face features are stored in the file system, and after the face features of at least one frame of image are extracted, the second sub-process compares the face features with the face features stored in the file system each time, so as to determine a face recognition result.
In the embodiment of the disclosure, a user can directly register the face features through the equipment where the operating system is located, and can also send the registered face features to the equipment where the operating system is located after registering the face features through other terminal equipment, and the equipment where the operating system is located stores the registered face features in a file system.
In the above embodiment, the registered face features may be stored in the file system, so that the second sub-process matches the face features extracted from at least one frame of image with the pre-stored face features, thereby obtaining a face recognition result, and the implementation is simple and convenient, and the availability is high.
In some optional embodiments, the face recognition algorithm is run in the CPU, and in the embodiments of the present disclosure, in order to accelerate the face recognition, hardware acceleration resources on the chip where the operating system is located may be used to accelerate the face recognition algorithm, so as to further improve the face recognition speed. Among other things, the hardware acceleration resources may include, but are not limited to, a digital signal Processor (DIGITAL SIGNAL Processor, DSP) and/or GPU.
Hardware resources capable of accelerating the face recognition speed in the face recognition process can be used as hardware acceleration resources, and the disclosure is not limited to this.
In some alternative embodiments, such as shown in fig. 5, the method further comprises:
In step 104, at least part of the resources occupied by the second sub-process are released.
In the embodiment of the disclosure, the second sub-process may be turned off to release the resources occupied by the second sub-process, and may also be run in the background or switched to the power saving mode to release at least part of the resources occupied by the second sub-process.
The released resources may be used to initialize other processes. Therefore, the occupied time of the face recognition process is shortened, and after the face recognition result is obtained, limited resources can be reasonably called, so that resource waste is avoided, and other processes can call more idle resources in the initialization process.
In some alternative embodiments, such as shown in fig. 6, the method further comprises:
In step 105, if the face recognition result is that the target face is recognized, after the operating system completes initialization, the face recognition result is sent to an application layer.
In the embodiment of the disclosure, if the second sub-process obtains the face recognition result, the face recognition result is that the target face is recognized, the face recognition result may be saved. After the whole operating system is initialized, the stored face recognition result can be sent to the application layer through the first subprocess.
In step 106, the application layer adjusts the target device according to the configuration data corresponding to the target face.
In the embodiment of the present disclosure, the application layer has pre-stored a correspondence between a face and configuration data, where the configuration data corresponding to the target face includes at least configuration data of the target device, that means, by the application layer, configuration parameters of devices corresponding to all the configuration data may be adjusted, or at least part of configuration parameters of devices corresponding to the configuration data may be adjusted, or at least part of configuration parameters of at least part of devices corresponding to the configuration data may be adjusted.
For example, the configuration data of the target device includes, but is not limited to, a back gear, an air conditioner gear, a volume level, a light intensity, and the like. Accordingly, the target device may be at least one of a seat, an air conditioner, an audio playback device, and an atmosphere lamp that the operating system can control.
The application layer can refer to the configuration data to adjust the configuration parameters corresponding to the seat, the air conditioner, the audio playing device and the atmosphere lamp respectively, and can also adjust the configuration parameters of the seat, the air conditioner, the audio playing device and partial devices in the atmosphere lamp, for example, only adjust the configuration parameters of the seat and the air conditioner. Or at least part of the configuration parameters of at least part of the devices corresponding to the configuration data may also be adjusted, for example, the configuration parameters of the atmosphere lamp include color and number, and only the color of the atmosphere lamp may be adjusted.
In the embodiment of the present disclosure, for the same type of configuration data, configuration data corresponding to different faces may be different, and adjustment manners for target devices may also be different. For example, for configuration data such as a chair back gear, the seat position may include 4 to 5 or more adjustable gears, and when the configuration data of the chair back gears corresponding to the face 1 and the face 2 are respectively 1 gear and 3 gears, the seat position may be adjusted to 1 st gear if the face 1 is recognized as a result of face recognition, and the seat position may be adjusted to 3 rd gear if the face 2 is recognized as a result of face recognition.
Likewise, the air-conditioning gear, the volume of the audio playing device, the color and light of the atmosphere lamp, etc. can also be adjusted according to different kinds of configuration data. Of course, the operation can be specifically adjusted by combining with the operation of the user.
In the above embodiment, the corresponding configuration data may be determined according to the face recognition result, so as to adjust the target device, and the implementation is simple and the availability is high.
In some optional embodiments, after at least one frame of image is acquired, the first subprocess may display the image through the display module, so that a user may adjust a position of the user according to the image displayed by the display module, so that a face acquired by the image acquisition device is clearer, and a face identification result obtained later is more accurate.
In the embodiment of the present disclosure, after the second subprocess determines the face recognition result, the face recognition result may be sent to the display module for display through the first subprocess, where the display module may display relevant information about the success or failure of recognition, or may display the reason of the failure of recognition in the case of failure of recognition, for example, the detected face is not in the database, or the face recognition failure is caused due to the face shielding by the user. The user can perform face recognition again as required.
In the above embodiment, the at least one frame of image and/or the face recognition result may be sent to the display module for display through the first sub-process, which is simple and convenient to implement and has high availability.
In some alternative embodiments, the first sub-process service may be pre-added in the first process, or existing sub-processes in the first process may be multiplexed, and/or the second sub-process may be pre-added in the first process or an existing sub-process in the first process may be multiplexed.
The first process is a C++ frame service process, and a service corresponding to the first subprocess and/or a service corresponding to the second subprocess can be newly built in the C++ frame service process by modifying the resource file. The resource file is a file with an extension name rc, and the file can uniformly manage resources used in the program.
Or in the embodiment of the disclosure, in order to simplify the development difficulty, the first sub-process and/or the second sub-process may be multiplexed with the existing sub-process in the first process.
The first sub-process and the second sub-process may be both added in the first process c++ framework service process in advance, or one of them is added in the first process c++ framework service process, and the other one multiplexes the sub-processes existing in the first process c++ framework service process, or the first sub-process and the second sub-process may both multiplex the sub-processes existing in the first process c++ framework service process.
In the above embodiment, the first sub-process is added in advance in the first process or multiplexed with an existing sub-process in the first process, and/or the second sub-process is added in advance in the first process or multiplexed with an existing sub-process in the first process. The face recognition result is obtained before the initialization of the operating system is finished, so that the face recognition time is shortened.
In some alternative embodiments, the above-described methods may be used in a mobile and/or customizable machine device, such as a vehicle, aircraft, etc. If the system is used on a vehicle, the at least one frame of image acquired by the image acquisition device can comprise at least one frame of image of a driver of a vehicle cabin, and the operating system can be a vehicle operating system which comprises a reversing image module.
The first sub-process and the second sub-process may multiplex existing sub-processes in the first process, and in the embodiment of the present disclosure, the two sub-processes may multiplex a hardware abstraction layer interface definition language (HAL INTERFACE definition language, HIDL) service included in the reverse image module. And integrating the service corresponding to the first subprocess in the HIDL driving service included in the reversing image module, and integrating the calling service of the vehicle-mounted camera and the service corresponding to the second subprocess in the HIDL application service included in the reversing image module.
The vehicle-mounted camera can acquire at least one frame of image comprising a vehicle cabin driver, and the first subprocess acquires the at least one frame of image comprising the vehicle cabin driver after initialization and sends the at least one frame of image to the second subprocess. And the second subprocess carries out face recognition on at least one frame of image comprising the cabin driver to obtain a face recognition result. And under the condition that the face recognition result is that the target face is recognized, the configuration data corresponding to the target face can be determined, so that the seat gear, the air-conditioning gear, the atmosphere lamp color, the light brightness and the like are adjusted.
In the above embodiment, after the driver enters the vehicle, the face recognition result can be quickly determined without waiting for the end of the initialization process of the vehicle operation system, and the time for obtaining the face recognition result is shortened.
In some alternative embodiments, the above-described process is further illustrated in conjunction with a vehicle operator system as follows.
Services respectively corresponding to the first subprocess and the second subprocess can be newly added in the C++ framework service process of the vehicle machine operating system by modifying the resource file. Or in order to simplify the complexity of the development of the operating system and improve the face recognition speed, the development can be assisted by starting the service of the android operating system bottom layer which is relatively quick and uses the same driving module, and the driving service and the reversing application service of the reversing image module are multiplexed by the first subprocess and/or the second subprocess.
After the driver enters the vehicle to start the vehicle, the vehicle machine operating system starts to start and enters an initialization process. The first process is a C++ framework service process, and the operating system initializes the service corresponding to the image acquisition device while initializing the first subprocess and the second subprocess. The services corresponding to the image acquisition device can comprise a camera service and a video card service. After the service initialization corresponding to the image acquisition device is finished, the image acquisition device can acquire at least one frame of image including a cabin driver, and the first subprocess acquires the at least one frame of image and sends the at least one frame of image to the second subprocess. The first subprocess can send at least one frame of image to the display module for display, so that a driver can adjust the head position according to the displayed image, and face recognition can be better performed.
The second subprocess can call a face recognition algorithm to extract the face features of at least one frame of image, and match the extracted face features with the face features prestored in the file system to obtain a face recognition result. The pre-stored face features may be face features that have been registered before, or may also be face features that are registered by the user through a terminal carried by the user and sent to a file system of the vehicle for storage. The pre-stored face features can be stored in the cloud end and obtained from the cloud end before face comparison is required; or stored locally on the vehicle (i.e., the electronic device deployed on the vehicle); or stored in a third party device such as a mobile device, so that the vehicle is obtained by adopting a transmission mode such as bluetooth, network, etc. with the third party device.
In the process of running the face recognition algorithm, the second subprocess can also utilize hardware acceleration resources such as a DSP or a GPU on the vehicle machine operation system to carry out algorithm acceleration, so that the face recognition speed can be further improved.
After the second subprocess obtains the face recognition result, the first subprocess can send the face recognition result to the display module for display, and the display module can display relevant information of successful recognition or failed recognition, and can also display the reason of failed recognition under the condition of failed recognition, for example, the detected face is not in a database, or the face recognition is failed due to the fact that the face is blocked by a user, and the like.
After the face recognition result is saved, at least part of the resources occupied by the second sub-process, including but not limited to CPU and GPU resources, may be released, so that other processes may be initialized. Therefore, the occupied time of the face recognition process is shortened, and after the face recognition result is obtained, limited resources can be reasonably called, so that resource waste is avoided, and other processes can call more idle resources in the initialization process.
After the whole operating system is initialized, the first subprocess can also send the face recognition result to an application layer, the application layer determines the configuration data corresponding to the target face according to the corresponding relation between the pre-stored face and the configuration data, and the vehicle operating system adjusts the target device based on the configuration data. For example, the configuration data includes personalized customization data for different cabin drivers, the vehicle operator system may adjust the seat position angle, turn on a preset atmosphere light color, and so on.
In the embodiment, the face recognition of the driver can be performed in the initialization process of the vehicle-mounted system, the face recognition result can be obtained without waiting for the end of the initialization process of the operating system, and the target equipment is adjusted according to the face recognition result, so that the time for obtaining the face recognition result is shortened, and the driving experience is improved.
Corresponding to the foregoing method embodiments, the present disclosure also provides embodiments of the apparatus.
As shown in fig. 7, fig. 7 is a block diagram of a face recognition device according to an exemplary embodiment of the present disclosure, the operating system initialization including a first process initialization and a second process initialization, the device including: the face recognition module 210 is configured to initialize the first process, obtain at least one frame of image through the first process, and perform face recognition on the at least one frame of image to obtain a face recognition result; the first initialization module 220 is configured to initiate initialization of the second process after the face recognition result is obtained.
In some alternative embodiments, the first process comprises a framework service process and the second process comprises a virtual machine process.
In some alternative embodiments, the face recognition module includes: and the acquisition sub-module is used for starting the image acquisition equipment through the first process and acquiring the at least one frame of image.
In some alternative embodiments, the apparatus further comprises: and the second initialization module is used for initializing the service corresponding to the image acquisition equipment in the process of initializing the first process.
In some alternative embodiments, the first process includes a first sub-process and a second sub-process; the face recognition module comprises: the execution sub-module is used for acquiring the at least one frame of image through the first sub-process and sending the at least one frame of image to the second sub-process; and the face recognition sub-module is used for obtaining the face recognition result according to the at least one frame of image through the second sub-process.
In some alternative embodiments, the apparatus further comprises: and the resource release module is used for releasing at least part of resources occupied by the second sub-process.
In some alternative embodiments, the apparatus further comprises: the generation module is used for sending the face recognition result to an application layer after the operation system completes initialization if the face recognition result is the target face recognition; and the device adjusting module is used for adjusting the target device according to the configuration data corresponding to the target face through the application layer.
In some alternative embodiments, the first sub-process is pre-added in the first process or multiplexes existing sub-processes in the first process; and/or the second sub-process is added in the first process in advance or is multiplexed with the existing sub-process in the first process.
In some optional embodiments, when the operating system is a vehicle-mounted operating system, the vehicle-mounted operating system includes a reversing image module, a service corresponding to the first subprocess is integrated in a driving service of the reversing image module, and a calling service of the vehicle-mounted camera and a service corresponding to the second subprocess are integrated in a reversing application service of the reversing image module; the vehicle-mounted camera is used for collecting at least one frame of image comprising a vehicle cabin driver.
For the device embodiments, reference is made to the description of the method embodiments for the relevant points, since they essentially correspond to the method embodiments. The apparatus embodiments described above are merely illustrative, wherein elements illustrated as separate elements may or may not be physically separate, and elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the objectives of the disclosed solution. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
The embodiment of the disclosure also provides a computer readable storage medium, and the storage medium stores a computer program, and the computer program is used for executing the face recognition method.
In some alternative embodiments, the disclosed embodiments provide a computer program product comprising computer readable code which, when run on a device, causes a processor in the device to execute instructions for implementing the face recognition method provided in any of the embodiments above.
The computer program product may be realized in particular by means of hardware, software or a combination thereof. In an alternative embodiment, the computer program product is embodied as a computer storage medium, and in another alternative embodiment, the computer program product is embodied as a software product, such as a software development kit (Software Development Kit, SDK), or the like.
The embodiment of the disclosure also provides a face recognition device, which comprises: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to invoke the executable instructions stored in the memory to implement the face recognition method of any of the above.
The embodiment of the disclosure also provides a face recognition device, which comprises: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to invoke the executable instructions stored in the memory to implement the face recognition method of any of the above.
Fig. 8 is a schematic hardware structure of a face recognition device according to an embodiment of the present disclosure. The face recognition device 310 comprises a processor 311 and may further comprise an input device 312, an output device 313 and a memory 314. The input device 312, the output device 313, the memory 314, and the processor 311 are connected to each other via a bus.
The memory includes, but is not limited to, random access memory (random access memory, RAM), read-only memory (ROM), erasable programmable read-only memory (erasable programmable read only memory, EPROM), or portable read-only memory (compact disc read-only memory, CD-ROM) for associated instructions and data.
The input means is for inputting data and/or signals and the output means is for outputting data and/or signals. The output device and the input device may be separate devices or may be a single device.
The processor may include one or more processors, including for example one or more central processing units (central processing unit, CPU), which in the case of a CPU, may be a single-core CPU or a multi-core CPU.
The memory is used to store program codes and data for the network device.
The processor is used to call the program code and data in the memory to perform the steps of the method embodiments described above. Reference may be made specifically to the description of the method embodiments, and no further description is given here.
It will be appreciated that figure 8 shows only a simplified design of a face recognition device. In practical applications, the face recognition device may also include other necessary elements, including but not limited to any number of input/output devices, processors, controllers, memories, etc., and all face recognition devices that may implement the embodiments of the present disclosure are within the scope of the present disclosure.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any adaptations, uses, or adaptations of the disclosure following the general principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
The foregoing description of the preferred embodiments of the present disclosure is not intended to limit the disclosure, but rather to cover all modifications, equivalents, improvements and alternatives falling within the spirit and principles of the present disclosure.

Claims (18)

1. The face recognition method is characterized in that the operating system initialization comprises a first process initialization and a second process initialization, the operating system is an android operating system, and the method comprises the following steps:
initializing the first process, acquiring at least one frame of image through the first process, and carrying out face recognition on the at least one frame of image to obtain a face recognition result;
After the face recognition result is obtained, initializing the second process;
Wherein the first process comprises a framework service process and the second process comprises a virtual machine process.
2. The method of claim 1, wherein the acquiring at least one frame of image by the first process comprises:
And starting an image acquisition device through the first process, and acquiring the at least one frame of image.
3. The method according to claim 2, wherein the method further comprises:
and initializing a service corresponding to the image acquisition equipment in the process of initializing the first process.
4. A method according to any one of claims 1 to 3, wherein the first process comprises a first sub-process and a second sub-process;
Acquiring at least one frame of image through the first process, and performing face recognition on the at least one frame of image to obtain a face recognition result, wherein the face recognition result comprises the following steps:
Acquiring the at least one frame of image through the first subprocess, and sending the at least one frame of image to the second subprocess;
and obtaining the face recognition result according to the at least one frame of image through the second subprocess.
5. The method of claim 4, wherein after obtaining the face recognition result, the method further comprises:
and releasing at least part of resources occupied by the second sub-process.
6. The method of claim 5, wherein the method further comprises:
if the face recognition result is that the target face is recognized, after the operating system completes initialization, the face recognition result is sent to an application layer;
and adjusting target equipment according to the configuration data corresponding to the target face through the application layer.
7. The method of claim 5, wherein the first sub-process is pre-added in the first process or multiplexed with an existing sub-process in the first process;
And/or the second sub-process is added in the first process in advance or is multiplexed with the existing sub-process in the first process.
8. The method according to claim 7, wherein, in the case that the operating system is a vehicle operating system, the vehicle operating system includes a reverse image module, a service corresponding to the first subprocess is integrated in a driving service of the reverse image module, and a calling service of an on-vehicle camera and a service corresponding to the second subprocess are integrated in a reverse application service of the reverse image module; the vehicle-mounted camera is used for collecting at least one frame of image comprising a vehicle cabin driver.
9. A face recognition device, wherein operating system initialization includes a first process initialization and a second process initialization, the operating system is an android operating system, the device comprising:
The face recognition module is used for initializing the first process, acquiring at least one frame of image through the first process, and recognizing the face of the at least one frame of image to obtain a face recognition result;
The first initialization module is used for starting the initialization of the second process after the face recognition result is obtained;
Wherein the first process comprises a framework service process and the second process comprises a virtual machine process.
10. The apparatus of claim 9, wherein the face recognition module comprises:
And the acquisition sub-module is used for starting the image acquisition equipment through the first process and acquiring the at least one frame of image.
11. The apparatus of claim 10, wherein the apparatus further comprises:
And the second initialization module is used for initializing the service corresponding to the image acquisition equipment in the process of initializing the first process.
12. The apparatus of any of claims 9 to 11, wherein the first process comprises a first sub-process and a second sub-process;
The face recognition module comprises:
The execution sub-module is used for acquiring the at least one frame of image through the first sub-process and sending the at least one frame of image to the second sub-process;
and the face recognition sub-module is used for obtaining the face recognition result according to the at least one frame of image through the second sub-process.
13. The apparatus of claim 12, wherein the apparatus further comprises:
and the resource release module is used for releasing at least part of resources occupied by the second sub-process.
14. The apparatus of claim 13, wherein the apparatus further comprises:
The generation module is used for sending the face recognition result to an application layer after the operation system completes initialization if the face recognition result is the target face recognition;
and the device adjusting module is used for adjusting the target device according to the configuration data corresponding to the target face through the application layer.
15. The apparatus of claim 13, wherein the first sub-process is pre-added in the first process or multiplexed with an existing sub-process in the first process;
And/or the second sub-process is added in the first process in advance or is multiplexed with the existing sub-process in the first process.
16. The apparatus of claim 15, wherein, in the case where the operating system is a vehicle operating system, the vehicle operating system includes a reverse image module, a service corresponding to the first sub-process is integrated in a driving service of the reverse image module, and a calling service of an on-vehicle camera and a service corresponding to the second sub-process are integrated in a reverse application service of the reverse image module; the vehicle-mounted camera is used for collecting at least one frame of image comprising a vehicle cabin driver.
17. A computer readable storage medium, characterized in that the storage medium stores a computer program for executing the face recognition method according to any one of the preceding claims 1 to 8.
18. A face recognition device, comprising:
A processor;
A memory for storing the processor-executable instructions;
Wherein the processor is configured to invoke executable instructions stored in the memory to implement the face recognition method of any of claims 1-8.
CN202010217617.4A 2020-03-25 2020-03-25 Face recognition method and device and storage medium Active CN111258669B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010217617.4A CN111258669B (en) 2020-03-25 2020-03-25 Face recognition method and device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010217617.4A CN111258669B (en) 2020-03-25 2020-03-25 Face recognition method and device and storage medium

Publications (2)

Publication Number Publication Date
CN111258669A CN111258669A (en) 2020-06-09
CN111258669B true CN111258669B (en) 2024-04-16

Family

ID=70951558

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010217617.4A Active CN111258669B (en) 2020-03-25 2020-03-25 Face recognition method and device and storage medium

Country Status (1)

Country Link
CN (1) CN111258669B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114286107A (en) * 2021-12-30 2022-04-05 武汉华威科智能技术有限公司 Method, system, device and medium for improving real-time video processing efficiency

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101464950A (en) * 2009-01-16 2009-06-24 北京航空航天大学 Video human face identification and retrieval method based on on-line learning and Bayesian inference
CN104503788A (en) * 2014-12-16 2015-04-08 电子科技大学 Setting method capable of shortening starting time of Android operating system
CN105843375A (en) * 2016-02-22 2016-08-10 乐卡汽车智能科技(北京)有限公司 Vehicle setting method and apparatus, and vehicle electronic information system
CN106043124A (en) * 2016-05-25 2016-10-26 青岛海信移动通信技术股份有限公司 Method and device for controlling vehicle backing image display
CN106627261A (en) * 2016-11-08 2017-05-10 广州大学 Automatic memory system and method based on face recognition for car seats
CN106740596A (en) * 2016-11-30 2017-05-31 北京汽车集团有限公司 Steering position method of adjustment, device and vehicle
CN106954281A (en) * 2017-03-24 2017-07-14 成都市极米科技有限公司 A kind of WIFI connection methods and device
CN108319480A (en) * 2018-02-01 2018-07-24 微鲸科技有限公司 Bluetooth service starts method, apparatus and electronic equipment
CN108319916A (en) * 2018-02-01 2018-07-24 广州市君望机器人自动化有限公司 Face identification method, device, robot and storage medium
CN108733429A (en) * 2018-05-16 2018-11-02 Oppo广东移动通信有限公司 Method of adjustment, device, storage medium and the mobile terminal of system resource configuration
CN109145653A (en) * 2018-08-01 2019-01-04 Oppo广东移动通信有限公司 Data processing method and device, electronic equipment, computer readable storage medium
WO2019072132A1 (en) * 2017-10-11 2019-04-18 Oppo广东移动通信有限公司 Face recognition method and related product
CN110254393A (en) * 2019-06-21 2019-09-20 一汽轿车股份有限公司 A kind of automotive self-adaptive control method based on face recognition technology

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101464950A (en) * 2009-01-16 2009-06-24 北京航空航天大学 Video human face identification and retrieval method based on on-line learning and Bayesian inference
CN104503788A (en) * 2014-12-16 2015-04-08 电子科技大学 Setting method capable of shortening starting time of Android operating system
CN105843375A (en) * 2016-02-22 2016-08-10 乐卡汽车智能科技(北京)有限公司 Vehicle setting method and apparatus, and vehicle electronic information system
CN106043124A (en) * 2016-05-25 2016-10-26 青岛海信移动通信技术股份有限公司 Method and device for controlling vehicle backing image display
CN106627261A (en) * 2016-11-08 2017-05-10 广州大学 Automatic memory system and method based on face recognition for car seats
CN106740596A (en) * 2016-11-30 2017-05-31 北京汽车集团有限公司 Steering position method of adjustment, device and vehicle
CN106954281A (en) * 2017-03-24 2017-07-14 成都市极米科技有限公司 A kind of WIFI connection methods and device
WO2019072132A1 (en) * 2017-10-11 2019-04-18 Oppo广东移动通信有限公司 Face recognition method and related product
CN108319480A (en) * 2018-02-01 2018-07-24 微鲸科技有限公司 Bluetooth service starts method, apparatus and electronic equipment
CN108319916A (en) * 2018-02-01 2018-07-24 广州市君望机器人自动化有限公司 Face identification method, device, robot and storage medium
CN108733429A (en) * 2018-05-16 2018-11-02 Oppo广东移动通信有限公司 Method of adjustment, device, storage medium and the mobile terminal of system resource configuration
CN109145653A (en) * 2018-08-01 2019-01-04 Oppo广东移动通信有限公司 Data processing method and device, electronic equipment, computer readable storage medium
CN110254393A (en) * 2019-06-21 2019-09-20 一汽轿车股份有限公司 A kind of automotive self-adaptive control method based on face recognition technology

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Linking and loading in a persistent DSM operating system;Schoettner, M. 等;Parallel and Distributed Computing and Systems;20000101;全文 *
张静 ; 褚丽莉 ; 周影 ; .基于OpenCV的ROS平台人脸识别***的研究.信息***工程.2020,(第02期),全文. *

Also Published As

Publication number Publication date
CN111258669A (en) 2020-06-09

Similar Documents

Publication Publication Date Title
US10885713B2 (en) Method, apparatus, and system for generating an AR application and rendering an AR instance
CN111258669B (en) Face recognition method and device and storage medium
CN112818311A (en) Service method of vehicle-mounted function, man-machine interaction system and electronic equipment
CN109635639B (en) Method, device, equipment and storage medium for detecting position of traffic sign
CN112954231A (en) Video acquisition equipment, vehicle cabin detection and synchronous exposure method
CN111179369B (en) GPU rendering method and device based on android system
CN110717782B (en) Electronic resource allocation method and device
CN110751129B (en) Identity verification method, device and equipment for express service and storage medium
CN113071511A (en) Method and device for displaying reverse image, electronic equipment and storage medium
CN113411496A (en) Control method and device for vehicle-mounted camera and electronic equipment
CN110933314B (en) Focus-following shooting method and related product
CN112686958A (en) Calibration method and device and electronic equipment
CN116400878A (en) Display method and device of head-mounted display device, electronic device and storage medium
CN107832726B (en) User identification and confirmation device and vehicle central control system
CN114077473A (en) Communication method, device and system
CN113901895B (en) Door opening action recognition method and device for vehicle and processing equipment
CN110853650A (en) Image information acquisition method and image information acquisition device
CN113168485A (en) Electronic device for providing request security service through secure element, and method for controlling same
CN115311866B (en) Vehicle linkage method and device
CN111013138A (en) Voice control method and device, electronic equipment and storage medium
JP2002512713A (en) Access control system
CN114979475A (en) Image display method, controller, display device and medium
CN116567035A (en) Internet of vehicles data uploading and receiving system, method, equipment and medium
CN117931235A (en) Method and device for updating icon theme of display interface of vehicle, vehicle and storage medium
CN111414213A (en) Method for identifying boot stage of basic input and output system

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