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

Face recognition method and device and storage medium Download PDF

Info

Publication number
CN111258669A
CN111258669A CN202010217617.4A CN202010217617A CN111258669A CN 111258669 A CN111258669 A CN 111258669A CN 202010217617 A CN202010217617 A CN 202010217617A CN 111258669 A CN111258669 A CN 111258669A
Authority
CN
China
Prior art keywords
face recognition
image
sub
frame
initialization
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.)
Granted
Application number
CN202010217617.4A
Other languages
Chinese (zh)
Other versions
CN111258669B (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

Images

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 present disclosure provides a face recognition method, a face recognition device, and a storage medium, wherein an operating system initialization includes a first process initialization and a second process initialization, and the method includes: 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; and after the face recognition result is obtained, starting initialization of the second process.

Description

Face recognition method and device and storage medium
Technical Field
The present disclosure relates to the field of face recognition, and in particular, to a face recognition method and apparatus, and a storage medium.
Background
At present, a scheme for performing face recognition in an android operating system is performed through an application layer of the android operating system.
In practical application, after the android operating system is initialized, the face recognition can be performed through the application layer. Since the initialization of the android operating system includes the initialization of a plurality of processes, the initialization process of the android operating system is slow, and the 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 the embodiments of the present disclosure, there is provided a face recognition method, where the initialization of an operating system includes 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 performing face recognition on the at least one frame of image to obtain a face recognition result; and after the face recognition result is obtained, starting initialization of the second process.
In some optional embodiments, the first process comprises a framework services 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 comprises: and starting image acquisition equipment through the first process, and acquiring the at least one frame of image.
In some optional embodiments, the method further comprises: and initializing the service corresponding to the image acquisition equipment in the process of initializing the first process.
In some optional embodiments, 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.
In some optional embodiments, after obtaining the face recognition result, the method further includes: and releasing at least part of resources occupied by the second sub-process.
In some optional embodiments, the method further comprises: if the face recognition result is that a target face is recognized, after the operating system completes initialization, the face recognition result is sent to an application layer; and adjusting the target equipment according to the configuration data corresponding to the target face through the application layer.
In some optional embodiments, the first sub-process is pre-added in the first process or multiplexes an existing sub-process in the first process; and/or the second sub-process is added in the first process in advance or multiplexes the existing sub-process in the first process.
In some optional embodiments, in a case that the operating system is a car machine operating system, the car machine operating system includes a car backing image module, a service corresponding to the first sub-process is integrated in a driving service of the car backing image module, and a calling service of a vehicle-mounted camera and a service corresponding to the second sub-process are integrated in a car backing application service of the car backing image module; the vehicle-mounted camera is used for collecting at least one frame of image including a cabin driver.
According to a second aspect of the embodiments of the present disclosure, there is provided a face recognition apparatus, where the operating system initialization includes a first process initialization and a second process initialization, the apparatus including: the face recognition module is used for 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; and the first initialization module is used for starting initialization of the second process after the face recognition result is obtained.
In some optional embodiments, the first process comprises a framework services process and the second process comprises a virtual machine process.
In some optional embodiments, the face recognition module comprises: and the acquisition submodule is used for starting the image acquisition equipment through the first process and acquiring the at least one frame of image.
In some optional 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 optional embodiments, the first process comprises a first sub-process and a second sub-process; the face recognition module includes: 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 optional embodiments, the apparatus further comprises: and the resource releasing module is used for releasing at least part of resources occupied by the second sub-process.
In some optional embodiments, the apparatus further comprises: the generation module is used for sending the face recognition result to an application layer after the operating system completes initialization if the face recognition result is that a target face is recognized; and the equipment adjusting module is used for adjusting the target equipment according to the configuration data corresponding to the target face through the application layer.
In some optional embodiments, the first sub-process is pre-added in the first process or multiplexes an existing sub-process in the first process; and/or the second sub-process is added in the first process in advance or multiplexes the existing sub-process in the first process.
In some optional embodiments, in a case that the operating system is a car machine operating system, the car machine operating system includes a car backing image module, a service corresponding to the first sub-process is integrated in a driving service of the car backing image module, and a calling service of a vehicle-mounted camera and a service corresponding to the second sub-process are integrated in a car backing application service of the car backing image module; the vehicle-mounted camera is used for collecting at least one frame of image including a cabin driver.
According to a third aspect of the 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 first aspect.
According to a fourth aspect of the 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 executable instructions stored in the memory to implement the face recognition method of any one of the first aspect.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
in the embodiment of the disclosure, the process of initializing the operating system includes initializing a first process and 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 face recognition method and the face recognition device can perform face recognition in the process of initializing the operating system, can determine the face recognition result without waiting for the end of the initializing 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 present disclosure and together with the description, serve to explain the principles of the disclosure.
FIG. 1 is an operating system initialization flow diagram illustrating the present disclosure in accordance with an illustrative embodiment;
FIG. 2 is a flow chart illustrating a face recognition method according to an exemplary embodiment of the present disclosure;
FIG. 3 is a flow chart illustrating another face recognition method according to an exemplary embodiment of the present disclosure;
FIG. 4 is a flow chart illustrating another face recognition method according to an exemplary embodiment of the present disclosure;
FIG. 5 is a flow chart illustrating another face recognition method according to an exemplary embodiment of the present disclosure;
FIG. 6 is a flow chart illustrating another face recognition method according to an exemplary embodiment of the present disclosure;
FIG. 7 is a block diagram of a face recognition apparatus according to an exemplary embodiment of the present disclosure;
fig. 8 is a schematic structural diagram illustrating a face recognition apparatus according to an exemplary embodiment of the present disclosure.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended 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 operated herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such 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. The word "if," as used herein, may be interpreted as "at … …" or "at … …" or "in response to a determination," depending on the context.
In the embodiment of the present disclosure, an android operating system is taken as an example, and an operating system initialization process is introduced. For example, as shown in fig. 1, the android operating system first needs to initialize a BootLoader (BootLoader). And further starting the initialization of the Linux operating system kernel (Linux). After the Linux kernel initialization is finished, an initialization (Init) process is started, and then a framework service (frame service) and a Java virtual machine (zygate) process of a C + + layer are started. After the Zygote process is initialized, starting the Javaframe work service, finishing the initialization process of the whole android operating system after the initialization of the Javaframe work service is finished, and subsequently starting the application of the application layer. The operating system initialization process described above may be run in a Central Processing Unit (CPU).
It can be seen that the above-mentioned initialization process of the operating system involves a plurality of processes, and the time of the initialization process is relatively long. If the face recognition needs to be carried out, the face recognition can be carried out through the application layer only by waiting for the initialization of the operating system to be finished, so that the face recognition time is longer.
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, and shorten the face recognition time. The face recognition method may be used in an operating System, which includes but is not limited to an android operating System, an Input Output System (IOS), and the like, and for convenience of description, the following embodiments will use the android operating System as an example for explanation.
For example, as shown in fig. 2, fig. 2 illustrates a face recognition method according to an exemplary embodiment, which includes the following steps:
in step 101, 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.
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. The first process comprises a framework service process, and the framework service process comprises but is not limited to a C + + framework service process. After the first process is initialized, a face recognition result can be obtained through the first process.
In step 102, after the face recognition result is obtained, the initialization of the second process is started.
In the embodiment of the present disclosure, the second process is also a process included in the operating system, and during the initialization process of the operating system, the second process also needs to be initialized. In embodiments of the present disclosure, the second process comprises a virtual machine process including, but not limited to, a Java virtual machine process.
Since the time required to initialize 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 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 face recognition method and the face recognition device can perform face recognition in the process of initializing the operating system, can determine the face recognition result without waiting for the end of the initializing 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 by the first process in step 101 may include:
and starting image acquisition equipment through the first process, and acquiring the at least one frame of image.
In the embodiment of the present disclosure, the image capturing device may include a camera, and after initializing the first process, the camera is started through the first process, so as to capture at least one frame of image, and subsequently perform face recognition on the captured at least one frame of image, so as 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 apparatus is initialized.
In the 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 driver service (openGL service). In the process of initializing the first process, the operating system may further initialize the service corresponding to the image capturing device. After the service corresponding to the image acquisition equipment is initialized, at least one frame of image can be acquired through the image acquisition equipment so as to carry out face recognition in the following process.
In the above embodiment, in the process of initializing the first process, a service corresponding to the image capturing device may be initialized, 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 also 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 process/sub-process. The second sub-process may include a face recognition algorithm, and a face recognition result is obtained by performing face recognition on the image.
Accordingly, step 101 may comprise, for example as shown in fig. 4:
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 sub-process, and the at least one frame of image is sent to the second sub-process.
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 present disclosure, the second sub-process may call 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 Processing Unit (GPU), or the like, or other implementation manners may be adopted to determine a face in at least one frame of image, extract face features, and match the extracted face features with pre-stored face features to obtain a face recognition result.
In the above embodiment, at least one frame of image may be acquired by a first sub-process included in a first process, and 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 method achieves the purpose of obtaining the face recognition result in the initialization process of the operating system, and shortens the time for obtaining the face recognition result.
In some optional 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, a user registers the face features in advance, and stores the registered face features in the file system, and the second sub-process compares the extracted face features of at least one frame of image with the face features stored in the file system each time to determine a face recognition result.
In the embodiment of the present disclosure, a user may directly register a facial feature through the device where the operating system is located, and may also register a facial feature through another terminal device and then send the registered facial feature to the device where the operating system is located, and the device where the operating system is located stores the registered facial feature in the 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 usability is high.
In some optional embodiments, the face recognition algorithm runs in the CPU, and in the embodiments of the present disclosure, in order to accelerate the face recognition, the hardware acceleration resource on the chip where the operating system is located may be used to accelerate the face recognition algorithm, so as to further increase the speed of the face recognition. The hardware acceleration resources may include, but are not limited to, a Digital Signal Processor (DSP) and/or a GPU, among others.
In the face recognition process, all hardware resources capable of accelerating the face recognition speed can be used as hardware acceleration resources, which is not limited in the disclosure.
In some alternative embodiments, such as shown in fig. 5, the method further comprises:
in step 104, at least a portion of the resources occupied by the second sub-process is released.
In the embodiment of the present disclosure, the second sub-process may be turned off to release the resources occupied by the second sub-process, and at least a part of the resources occupied by the second sub-process may also be released by running the second sub-process in the background or switching to the power saving mode.
The freed resources may be used to initialize other processes. Therefore, the time occupied by the face recognition process is shortened, and after the face recognition result is obtained, the limited resources can be reasonably called, so that the 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 a 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 present disclosure, if the second sub-process obtains a face recognition result, the face recognition result is a target face recognized, and the face recognition result may be stored. After the whole operating system is initialized, the saved face recognition result can be sent to the application layer through the first sub-process.
In step 106, the target device is adjusted according to the configuration data corresponding to the target face through the application layer.
In the embodiment of the present disclosure, the application layer has pre-stored a corresponding relationship between a human face and configuration data, where the configuration data corresponding to a target human face at least includes configuration data of a target device, that is, through the application layer, configuration parameters of devices corresponding to all configuration data may be adjusted with reference to the configuration data, or at least some configuration parameters 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 seat back position, an air conditioner position, a volume level, a light level, and the like. Accordingly, the target device may be at least one of a seat, an air conditioner, an audio playback device, and an ambience light that may be controlled by an operating system.
The application layer may adjust configuration parameters corresponding to the seat, the air conditioner, the audio playing device, and the atmosphere lamp, respectively, with reference to the configuration data, or may adjust configuration parameters of some devices in the seat, the air conditioner, the audio playing device, and the atmosphere lamp, for example, only adjust 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 can be adjusted, for example, the configuration parameters of the atmosphere lamp include color and number, and only the color of the atmosphere lamp can be adjusted.
In the embodiment of the present disclosure, for the same type of configuration data, the configuration data corresponding to different faces may be different, and the adjustment manner for the target device may also be different. For example, for configuration data such as chair back gears, the chair position may include 4 to 5 or even 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 the 1 st gear if the face 1 is recognized as a result of the face recognition, and the seat position may be adjusted to the 3 rd gear if the face 2 is recognized as a result of the face recognition.
Similarly, the gear of the air conditioner, the volume of the audio playing device, the color and light of the atmosphere lamp and the like can be adjusted according to different types of configuration data. Of course, the adjustment may be specifically performed in combination with the current operation of the user.
In the embodiment, the corresponding configuration data can be determined according to the face recognition result, so that the target equipment is adjusted, the implementation is simple and convenient, and the usability is high.
In some optional embodiments, the first sub-process may display, by the display module, the image of the at least one frame after being acquired, so that a user may perform relevant operations such as adjustment of the position of the user according to the image displayed by the display module, so that the face acquired by the image acquisition device is clearer, and a subsequently obtained face recognition result is more accurate.
In the embodiment of the present disclosure, after the second sub-process determines the face recognition result, the first sub-process sends the face recognition result to the display module for displaying, and the display module may display information related to the success or failure of the recognition, and may also display a reason of the failure of the recognition in case of the failure of the recognition, for example, the detected face is not in the database, or the face recognition fails due to the face being blocked 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 a display module for display through the first sub-process, which is simple and convenient to implement and high in usability.
In some optional embodiments, the first sub-process service may be pre-added in the first process, or may multiplex existing sub-processes in the first process, and/or the second sub-process may be pre-added in the first process or multiplex existing sub-processes in the first process.
The first process is a C + + framework service process, and a service corresponding to the first sub-process and/or a service corresponding to the second sub-process can be newly established in the C + + framework service process by modifying the resource file. The resource file is a file with an extension of rc, and the file can be used for uniformly managing resources used in the program.
Alternatively, in the embodiment of the present disclosure, in order to simplify the development difficulty, the first sub-process and/or the second sub-process may reuse an existing sub-process in the first process.
The first sub-process and the second sub-process may both be added in advance to the first process C + + framework service process, or one of the first sub-processes may be added to the first process C + + framework service process, and the other of the first sub-processes may multiplex a sub-process existing in the first process C + + framework service process, or both the first sub-process and the second sub-process may multiplex a sub-process existing in the first process C + + framework service process.
In the above embodiment, the first sub-process is added to the first process in advance or multiplexes an existing sub-process in the first process, and/or the second sub-process is added to the first process in advance or multiplexes 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 method may be used in mobile and/or customized machine equipment, such as vehicles, airplanes, etc. If the system is used on a vehicle, the at least one frame of image acquired by the image acquisition device may include at least one frame of image of a cabin driver, and the operating system may be a vehicle machine operating system, and the vehicle machine operating system includes a reverse image module.
In the embodiment of the present disclosure, the two sub-processes may multiplex a hardware abstraction layer interface definition language (HIDL) service included in the reverse image module. And integrating services corresponding to the first sub-process in HIDL driving services included by the reversing image module, and integrating calling services of the vehicle-mounted camera and services corresponding to the second sub-process in HIDL application services included by the reversing image module.
The vehicle-mounted camera can acquire at least one frame of image including the cabin driver, and the first sub-process acquires the at least one frame of image including the cabin driver and sends the at least one frame of image to the second sub-process after initialization. And the second subprocess carries out face recognition on at least one frame of image including the driver in the vehicle cabin 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 conditioner gear, the atmosphere light color, the light brightness and the like are adjusted.
In the 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 operating system, so that the time for obtaining the face recognition result is shortened.
In some alternative embodiments, the above process is further illustrated in conjunction with a car machine operating system as follows.
Services corresponding to the first sub-process and the second sub-process can be 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 at the bottom layer of the android operating system which is relatively quick and uses the same driving module, and the first sub-process and/or the second sub-process multiplex the driving service and the backing application service of the backing image module.
After a driver enters a vehicle and starts the vehicle, a 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 service corresponding to the image acquisition device can comprise a camera service and a display 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 sub-process acquires the at least one frame of image and sends the at least one frame of image to the second sub-process. The first sub-process can also send at least one frame of image to the display module to be displayed, so that the driver can adjust the head position according to the displayed image, and face recognition can be better carried out.
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 previously, or face features that are registered by a terminal carried by a user and sent to a file system of a vehicle for storage. The pre-stored face features can be stored in a cloud, and are acquired from the cloud before face comparison is needed; or, stored locally at the vehicle machine (i.e., the electronic device deployed on the vehicle); or, the information is stored in a third-party device such as a mobile device, so that the car machine obtains the information by adopting a transmission mode such as bluetooth, a network and the like with the third-party device.
In the process of running the face recognition algorithm, the second sub-process can also utilize hardware acceleration resources such as a DSP or a GPU on the vehicle machine operating system to accelerate the algorithm, so that the speed of face recognition can be further increased.
After the second sub-process obtains the face recognition result, the first sub-process may send the face recognition result to the display module for display, and the display module may display information related to the success or failure of the recognition, and may also display the reason of the failure of the recognition under the condition of the failure of the recognition, for example, the detected face is not in the database, or the face recognition fails due to the face being blocked by the user.
After the face recognition result is saved, at least a part of resources occupied by the second sub-process can be released, wherein the resources include but are not limited to CPU (central processing unit) and GPU (graphics processing unit) resources and the like, so that other processes can be initialized. Therefore, the time occupied by the face recognition process is shortened, and after the face recognition result is obtained, the limited resources can be reasonably called, so that the resource waste is avoided, and other processes can call more idle resources in the initialization process.
After the initialization of the whole operating system is finished, the first sub-process can also send a face recognition result to the application layer, the application layer determines configuration data corresponding to a target face according to a corresponding relation between a pre-stored face and the configuration data, and the in-vehicle operating system adjusts target equipment based on the configuration data. For example, the configuration data comprises personalized customization data for different cabin drivers, the vehicle machine operating system can adjust the seat position angle, turn on the preset atmosphere light color and the like.
In the embodiment, the face recognition of the driver can be performed in the vehicle-mounted device system initialization process, the face recognition result can be obtained without waiting for the completion of the operation system initialization process, the target device is adjusted according to the face recognition result, 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 an apparatus.
As shown in fig. 7, fig. 7 is a block diagram of a face recognition apparatus according to an exemplary embodiment of the present disclosure, where the initialization of the operating system includes a first process initialization and a second process initialization, the apparatus includes: the face recognition module 210 is configured to initialize the first process, acquire 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 start initialization of the second process after the face recognition result is obtained.
In some optional embodiments, the first process comprises a framework services process and the second process comprises a virtual machine process.
In some optional embodiments, the face recognition module comprises: and the acquisition submodule is used for starting the image acquisition equipment through the first process and acquiring the at least one frame of image.
In some optional 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 optional embodiments, the first process comprises a first sub-process and a second sub-process; the face recognition module includes: 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 optional embodiments, the apparatus further comprises: and the resource releasing module is used for releasing at least part of resources occupied by the second sub-process.
In some optional embodiments, the apparatus further comprises: the generation module is used for sending the face recognition result to an application layer after the operating system completes initialization if the face recognition result is that a target face is recognized; and the equipment adjusting module is used for adjusting the target equipment according to the configuration data corresponding to the target face through the application layer.
In some optional embodiments, the first sub-process is pre-added in the first process or multiplexes an existing sub-process in the first process; and/or the second sub-process is added in the first process in advance or multiplexes the existing sub-process in the first process.
In some optional embodiments, in a case that the operating system is a car machine operating system, the car machine operating system includes a car backing image module, a service corresponding to the first sub-process is integrated in a driving service of the car backing image module, and a calling service of a vehicle-mounted camera and a service corresponding to the second sub-process are integrated in a car backing application service of the car backing image module; the vehicle-mounted camera is used for collecting at least one frame of image including a cabin driver.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the disclosed solution. One of ordinary skill in the art can understand and implement it without inventive effort.
An embodiment of the present disclosure further provides a computer-readable storage medium, where a computer program is stored in the storage medium, and the computer program is used to execute any one of the above-mentioned face recognition methods.
In some optional embodiments, the disclosed embodiments provide a computer program product comprising computer readable code which, when run on a device, a processor in the device executes instructions for implementing a face recognition method as provided in any of the above embodiments.
The computer program product may be embodied in hardware, software or a combination thereof. In an alternative embodiment, the computer program product is embodied in a computer storage medium, and in another alternative embodiment, the computer program product is embodied in a Software product, such as a Software Development Kit (SDK), or the like.
The embodiment of the present disclosure further provides a face recognition apparatus, including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to call the executable instructions stored in the memory to implement any one of the above-mentioned face recognition methods.
The embodiment of the present disclosure further provides a face recognition apparatus, including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to call the executable instructions stored in the memory to implement any one of the above-mentioned face recognition methods.
Fig. 8 is a schematic diagram of a hardware structure of a face recognition device according to an embodiment of the present disclosure. The face recognition device 310 includes a processor 311, and may further include 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, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), or a portable read-only memory (CD-ROM), which is used for storing instructions and data.
The input means are for inputting data and/or signals and the output means are for outputting data and/or signals. The output means and the input means may be separate devices or may be an integral device.
The processor may include one or more processors, for example, one or more Central Processing Units (CPUs), and in the case of one CPU, the CPU may be a single-core CPU or a multi-core CPU.
The memory is used to store program codes and data of the network device.
The processor is used for calling the program codes and data in the memory and executing the steps in the method embodiment. Specifically, reference may be made to the description of the method embodiment, which is not repeated herein.
It will be appreciated that figure 8 only shows a simplified design of a face recognition apparatus. In practical applications, the face recognition device may further include other necessary components, including but not limited to any number of input/output devices, processors, controllers, memories, etc., and all face recognition devices that can 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 variations, uses, or adaptations of the disclosure following, in general, the 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 above description is only exemplary of the present disclosure and should not be taken as limiting the disclosure, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present disclosure should be included in the scope of the present disclosure.

Claims (20)

1. A face recognition method, wherein the initialization of an operating system includes a first process initialization and a second process initialization, the method comprising:
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;
and after the face recognition result is obtained, starting initialization of the second process.
2. The method of claim 1, wherein the first process comprises a framework services process and the second process comprises a virtual machine process.
3. The method of claim 1 or 2, wherein said acquiring at least one frame of image by said first process comprises:
and starting image acquisition equipment through the first process, and acquiring the at least one frame of image.
4. The method of claim 3, further comprising:
and initializing the service corresponding to the image acquisition equipment in the process of initializing the first process.
5. The method of any of claims 1-4, 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.
6. The method of claim 5, wherein after obtaining the face recognition result, the method further comprises:
and releasing at least part of resources occupied by the second sub-process.
7. The method according to any one of claims 1-6, further comprising:
if the face recognition result is that a target face is recognized, after the operating system completes initialization, the face recognition result is sent to an application layer;
and adjusting the target equipment according to the configuration data corresponding to the target face through the application layer.
8. The method according to any one of claims 5 or 6, wherein the first sub-process is pre-added in the first process or multiplexes an existing sub-process in the first process;
and/or the second sub-process is added in the first process in advance or multiplexes the existing sub-process in the first process.
9. The method according to claim 8, wherein when the operating system is a car machine operating system, the car machine operating system comprises a car backing image module, a service corresponding to the first subprocess is integrated in a driving service of the car backing image module, and a calling service of a vehicle-mounted camera and a service corresponding to the second subprocess are integrated in a car backing application service of the car backing image module; the vehicle-mounted camera is used for collecting at least one frame of image including a cabin driver.
10. An apparatus for face recognition, wherein the initialization of an operating system includes 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 performing face recognition on the at least one frame of image to obtain a face recognition result;
and the first initialization module is used for starting initialization of the second process after the face recognition result is obtained.
11. The apparatus of claim 10, wherein the first process comprises a framework services process and the second process comprises a virtual machine process.
12. The apparatus of claim 10 or 11, wherein the face recognition module comprises:
and the acquisition submodule is used for starting the image acquisition equipment through the first process and acquiring the at least one frame of image.
13. The apparatus of claim 12, further comprising:
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.
14. The apparatus of any of claims 10-13, wherein the first process comprises a first sub-process and a second sub-process;
the face recognition module includes:
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.
15. The method of claim 14, wherein the apparatus further comprises:
and the resource releasing module is used for releasing at least part of resources occupied by the second sub-process.
16. The apparatus according to any one of claims 10-15, further comprising:
the generation module is used for sending the face recognition result to an application layer after the operating system completes initialization if the face recognition result is that a target face is recognized;
and the equipment adjusting module is used for adjusting the target equipment according to the configuration data corresponding to the target face through the application layer.
17. The apparatus according to claim 14 or 15, wherein the first sub-process is pre-added in the first process or multiplexes an existing sub-process in the first process;
and/or the second sub-process is added in the first process in advance or multiplexes the existing sub-process in the first process.
18. The device according to claim 17, wherein when the operating system is a car machine operating system, the car machine operating system includes a car backing image module, a service corresponding to the first sub-process is integrated in a driving service of the car backing image module, and a calling service of a vehicle-mounted camera and a service corresponding to the second sub-process are integrated in a car backing application service of the car backing image module; the vehicle-mounted camera is used for collecting at least one frame of image including a cabin driver.
19. 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 9.
20. A face recognition apparatus, 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 one of claims 1-9.
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 true CN111258669A (en) 2020-06-09
CN111258669B 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)

Cited By (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
SCHOETTNER, M. 等: "Linking and loading in a persistent DSM operating system", PARALLEL AND DISTRIBUTED COMPUTING AND SYSTEMS, 1 January 2000 (2000-01-01) *
张静;褚丽莉;周影;: "基于OpenCV的ROS平台人脸识别***的研究", no. 02 *

Cited By (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

Also Published As

Publication number Publication date
CN111258669B (en) 2024-04-16

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
US10569726B2 (en) In-vehicle system
CN107835398A (en) A kind of customization navigation information display methods based on throwing screen, device
CN112959998B (en) Vehicle-mounted human-computer interaction method and device, vehicle and electronic equipment
CN111179369B (en) GPU rendering method and device based on android system
CN113071511A (en) Method and device for displaying reverse image, electronic equipment and storage medium
CN107683236A (en) The method and system that driving model for managing motor vehicles changes
CN113271330A (en) Proxy device, proxy system, and non-transitory recording medium
CN114756191B (en) Video data rapid display method and system based on android system
CN114077473A (en) Communication method, device and system
CN114419566A (en) Picture processing method and device
CN114461158A (en) Application screen projection method and device, vehicle-mounted terminal and readable storage medium
CN113901895B (en) Door opening action recognition method and device for vehicle and processing equipment
CN115686715A (en) Method, device and equipment for displaying starting-up picture of vehicle and storage medium
CN115311866B (en) Vehicle linkage method and device
CN113589730B (en) XEN-based multi-system control system and method for different display and related products
WO2022244178A1 (en) Device for estimating person being spoken to, method for estimating person being spoken to, and program for estimating person being spoken to
CN116755817A (en) Display method, device, equipment and storage medium
CN117891337A (en) Vehicle-mounted-based cloud travel scene construction method, device, system, medium and equipment
CN111414213A (en) Method for identifying boot stage of basic input and output system
CN116089292A (en) Vehicle-mounted software system simulation method and device, electronic equipment and storage medium
CN113270093A (en) Proxy device, proxy system, and non-transitory recording medium
CN117492998A (en) Intelligent cabin system and calculation power allocation method, equipment and storage medium thereof
CN109766144A (en) A kind of control event response method and device

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