WO2020173117A1 - 人脸识别方法、神经网络训练方法、装置及电子设备 - Google Patents

人脸识别方法、神经网络训练方法、装置及电子设备 Download PDF

Info

Publication number
WO2020173117A1
WO2020173117A1 PCT/CN2019/114674 CN2019114674W WO2020173117A1 WO 2020173117 A1 WO2020173117 A1 WO 2020173117A1 CN 2019114674 W CN2019114674 W CN 2019114674W WO 2020173117 A1 WO2020173117 A1 WO 2020173117A1
Authority
WO
WIPO (PCT)
Prior art keywords
face
type image
image sample
camera
image
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.)
Ceased
Application number
PCT/CN2019/114674
Other languages
English (en)
French (fr)
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.)
Beijing Sensetime Technology Development Co Ltd
Original Assignee
Beijing Sensetime Technology Development 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 Beijing Sensetime Technology Development Co Ltd filed Critical Beijing Sensetime Technology Development Co Ltd
Priority to JP2021540572A priority Critical patent/JP7402239B2/ja
Priority to KR1020217022399A priority patent/KR20210101313A/ko
Publication of WO2020173117A1 publication Critical patent/WO2020173117A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/172Classification, e.g. identification
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/0464Convolutional networks [CNN, ConvNet]
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/09Supervised learning
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/168Feature extraction; Face representation

Definitions

  • the present disclosure relates to the field of image processing technology, and in particular to a face recognition method, a neural network training method, a device, and an electronic device.
  • the present disclosure provides a technical solution for face recognition and a technical solution for neural network training.
  • embodiments of the present disclosure provide a face recognition method, including:
  • the first face feature is compared with the pre-stored second face feature to obtain a reference similarity.
  • the second face feature is obtained by extracting the feature of the second face image acquired by the second camera, so The second camera and the first camera belong to different types of cameras;
  • the first face image and the second face image can be recognized, and the first face image and the second face image are acquired by different types of cameras.
  • the first face image and the second face image are acquired through different types of cameras, so that the face recognition method provided by the embodiments of the present disclosure can be applied to more scenarios, which is not only convenient for face authentication, but also The camera used for face registration is also not limited, which improves the convenience of face registration.
  • embodiments of the present disclosure provide a neural network training method, including:
  • first type image sample and a second type image sample Acquire a first type image sample and a second type image sample, the first type image sample and the second type image sample are taken by different types of cameras, and the first type image sample and the second type
  • the image samples include human faces
  • the neural network is trained by using facial images captured by different types of cameras, which can effectively improve the accuracy of the facial features output by the neural network; at the same time, face recognition is performed and the neural network is used to extract human faces It also effectively improves the accuracy of face recognition.
  • a face recognition device including:
  • the first acquiring unit is configured to acquire the first face image through the first camera
  • the first extraction unit is configured to extract the first face feature of the first face image
  • the comparison unit is used to compare the first face feature with the pre-stored second face feature to obtain a reference Similarity, the second face feature is obtained by extracting the feature of a second face image obtained by a second camera, and the second camera and the first camera are different types of cameras;
  • the determining unit is configured to determine whether the first facial feature and the second facial feature correspond to the same person according to the reference similarity.
  • a neural network training device including:
  • the acquiring unit is configured to acquire a first type image sample and a second type image sample, the first type image sample and the second type image sample are taken by different types of cameras, and the first type image sample and The second type image samples include human faces;
  • an embodiment of the present disclosure also provides an electronic device, including: a processor and a memory; the memory is used for coupling with the processor, the memory is also used for storing program instructions, and the processor is It is configured to support the electronic device to perform corresponding functions in the method of the first aspect.
  • the embodiments of the present disclosure also provide an electronic device, including: a processor and a memory; the memory is used for coupling with the processor, the memory is also used for storing program instructions, and the processor is It is configured to support the electronic device to perform the corresponding function in the method of the second aspect.
  • the embodiments of the present disclosure also provide a face recognition system.
  • the face recognition system includes: a neural network training device and a face recognition device; the neural network training device and the face recognition device are coupled ;
  • the neural network training device is used to train a neural network
  • the face recognition device is used to apply the neural network trained by the neural network training device.
  • the embodiments of the present disclosure provide a computer-readable storage medium having instructions stored in the computer-readable storage medium, which when run on a computer, cause the computer to execute the methods described in the above aspects.
  • the embodiments of the present disclosure provide a computer program product containing instructions, which when run on a computer, cause the computer to execute the methods described in the foregoing aspects.
  • the applicant of the present disclosure found in the process of implementing the embodiments of the present disclosure that traditional face recognition methods often restrict the image type to be authenticated and the image type registered to the same image type. If the registration process uses RGB images, the authentication process also needs to be used RGB images, thus limiting the application of traditional face recognition schemes in scenes involving multiple types of cameras.
  • the embodiment of the present disclosure provides a face recognition solution for scenes involving multiple types of cameras.
  • the face image of the second face image obtained by one type of camera is used as the base library feature, and another The face feature of the first face image acquired by the type camera is compared with the base library feature, and face recognition is realized according to the comparison result, so that the face recognition method provided by the embodiment of the present disclosure can be applied to more scenes. It is convenient for face authentication, and the camera for face registration is not limited, which improves the convenience of face registration.
  • FIG. 1 is a schematic flowchart of a face recognition method provided by an embodiment of the present disclosure
  • FIG. 2 is a schematic flowchart of a neural network training method provided by an embodiment of the present disclosure
  • FIG. 3 is a schematic diagram of a training process provided by an embodiment of the present disclosure.
  • FIG. 4 is a schematic structural diagram of a face recognition device provided by an embodiment of the present disclosure
  • 5 is a schematic structural diagram of another face recognition device provided by an embodiment of the present disclosure
  • Fig. 6 is a schematic structural diagram of a neural network training device provided by an embodiment of the present disclosure.
  • FIG. 7 is a schematic structural diagram of a training unit provided by an embodiment of the present disclosure.
  • FIG. 8 is a schematic structural diagram of another neural network training device provided by an embodiment of the present disclosure.
  • FIG. 9 is a schematic structural diagram of an electronic device provided by an embodiment of the present disclosure.
  • FIG. 1 is a schematic flowchart of a face recognition method provided by an embodiment of the present disclosure.
  • the face recognition method can be applied to a face recognition device, and the face recognition method can also be applied to an electronic device.
  • the electronic device may include a server or a terminal device, and the server may include any type of server, such as a cloud server, etc., which is not limited in the embodiment of the present disclosure.
  • the terminal device may include a mobile phone, a tablet computer, a desktop computer, a vehicle-mounted device, a driver status monitoring system, a ride management system, a car rental management system, a car-hailing management system, etc.
  • the specific form of the terminal device in the embodiments of the present disclosure No uniqueness restriction. The following takes the face recognition method applied to an electronic device as an example for description.
  • the face recognition method includes:
  • the first face image may include an image captured by the first camera; or, the first face image may also include any frame image in the video stream data captured by the first camera, etc.
  • the embodiment of the present disclosure does not limit the source of the first face image.
  • the first camera may be a thermal imaging camera, or alternatively, the first camera is a visible light camera.
  • the second camera when the first camera is a thermal imaging camera, the second camera may be another camera different from the thermal imaging camera, for example, the second camera may be a visible light camera.
  • the first camera is a visible light camera
  • the second camera may be another camera different from the visible light camera, for example, the second camera may be a thermal imaging camera.
  • the visible light camera may include a red green blue (RGB) camera.
  • the thermal imaging camera may include an infrared radiation (IR) camera.
  • the IR camera imaging is not disturbed by ambient light / different application scenarios such as day or night, sunny, cloudy or rainy, external road or tunnel, etc., can collect images with little difference in quality.
  • RGB cameras are cheap and widely used.
  • RGB cameras are deployed in many terminals or scenes, and RGB images are also very popular and universal. Therefore, the vehicle-mounted camera can be an IR camera in a vehicle application scenario. Therefore, the RGB camera is used for face registration, which improves the convenience and flexibility of registration, and the IR camera is used for face recognition, which facilitates the use of vehicle cameras for real-time image collection, and unlocks, authority control, and personnel/vehicle management based on the results of face recognition Wait for processing. It is understandable that the above are only examples, and in specific implementation, other types of cameras may be included, which will not be listed here.
  • the first camera may be an external camera connected to the electronic device, or the electronic device Built-in cameras and so on, the embodiments of the present disclosure do not limit the specific implementation form of the first camera.
  • the first camera and the second camera may also be different types of vehicle-mounted cameras, that is, the first face image may be a face image obtained based on the vehicle-mounted camera in the driving area of the vehicle .
  • the first camera can be built in the camera, or, in the mobile phone, and Or, it is built into an in-vehicle device, etc.
  • the embodiment of the present disclosure does not uniquely limit the specific forms of the first camera and the second camera.
  • acquiring the first face image through the first camera includes:
  • the first face image is acquired through the vehicle-mounted camera, and the first face image includes the face image of the user of the vehicle.
  • vehicles may include motorized vehicles, non-motorized vehicles, automobiles, trucks, shuttle buses, taxis, two-wheeled vehicles, tricycles, four-wheeled and more than four-wheeled vehicles, toy cars, model robots, remote-controlled cars, etc.
  • the disclosed embodiment does not limit the specific type of the vehicle.
  • the user of the vehicle may include one or more of a person driving a vehicle, a person riding a vehicle, a person repairing the vehicle, a person refueling the vehicle, and a person controlling the vehicle.
  • the person who controls the vehicle can be like the person who controls the remote control car
  • the person who refuels the vehicle can be like the refueling worker
  • the person who modifies the vehicle can be like the auto repair worker
  • the person who rides the vehicle can be like taking a taxi or taking a shuttle bus, etc.
  • the person who drives the vehicle can be the driver, etc.
  • the embodiments of the present disclosure do not limit the specific types of the above vehicle users.
  • the embodiment of the present disclosure also provides a trigger condition for when the electronic device obtains the first face image, such as obtaining the first face image through a vehicle-mounted camera
  • the image includes: in the case of receiving the trigger instruction, obtaining the first face image through the vehicle-mounted camera;
  • the trigger instruction may be a trigger instruction input by a user received by the electronic device, or a trigger instruction sent by other electronic devices connected to the electronic device, etc.
  • the source and specific form of the trigger instruction in this embodiment Not limited.
  • the vehicle when the vehicle is running, it can be understood as when the vehicle is on fire, that is, when the electronic device detects that the vehicle is running, the electronic device can acquire the face image of the user in the driving area of the vehicle. An image of a human face.
  • the reference speed is used to measure how much the running speed of the vehicle reaches when the electronic device obtains the first face image. Therefore, the specific reference speed is not limited.
  • the reference speed can be set by the user, can also be set by a device connected to the electronic device to measure the running speed of the vehicle, or can be set by the electronic device, etc., which is not limited in this embodiment.
  • the first face image is acquired by setting the trigger condition, so that the identity of the vehicle user is recognized, which can effectively improve the efficiency of face recognition by the electronic device.
  • the electronic device can extract the first face feature of the first face image by any method.
  • the electronic device can extract the first face feature by using a feature point extraction algorithm, where the feature point
  • the extraction may use, but is not limited to, susan operator feature extraction, harris operator feature extraction, sift feature extraction, or neural network feature extraction, and so on.
  • the electronic device uses geometric feature facial feature extraction methods or template matching-based facial feature extraction The method is used to extract the first facial feature, etc.
  • the embodiment of the present disclosure does not limit how the electronic device extracts the first facial feature.
  • the electronic device may extract the first face feature of the first face through a neural network, where the neural network may be a neural network that has been trained in advance.
  • the pre-trained neural network can be a neural network trained by the electronic device in the embodiment of the present disclosure; it can also be a neural network trained by other equipment, and then the electronic device in the embodiment of the present disclosure learns from the other equipment.
  • the acquired neural network, etc., are not limited in the embodiment of the present disclosure.
  • the neural network may be designed by stacking network layers such as a convolutional layer, a nonlinear layer, and a pooling layer in a certain manner.
  • the embodiment of the present disclosure does not limit the specific network structure.
  • the designed neural network can be trained thousands or even tens of thousands of times by using supervised or weakly supervised methods based on the image with the annotation information. Network parameters until the training completion conditions predetermined by the neural network are met. Specific training methods are not limited in the embodiments of the present disclosure.
  • the use of neural networks for feature extraction of face images can achieve end-to-end output.
  • the first face image is input to a pre-trained neural network, and the output neural network performs feature extraction on the first face image.
  • the obtained feature map is the process of end-to-end facial image feature extraction.
  • face feature extraction is to perform face feature extraction for certain features of the face, and face features can also be called face representation.
  • extracting facial features through a neural network can be specifically extracting deep-level abstract features of a human face through a deep neural network.
  • the first face image is input to a pre-trained neural network, and the first face feature of the first face image is output through the neural network; wherein the neural network is based on the first type image sample and the second type image sample
  • the first type image samples and the second type image samples are taken by different types of cameras, and the first type image samples and the second type image samples include human faces.
  • the present disclosure trains the neural network by using image samples taken by two different types of cameras, so that the neural network can learn the feature extraction capabilities of different types of images, and thus realizes the ability to extract different types of images based on the trained neural network. Facial recognition capabilities.
  • the first face feature is compared with a pre-stored second face feature to obtain a reference similarity.
  • the second face feature is obtained by extracting the feature of the second face image obtained by the second camera, and the second camera It is a different type of camera from the first camera.
  • the first face image can be understood as a face image that needs to be authenticated, or can be understood as a face image that needs to be recognized, or can be understood as a face image that needs to be queried.
  • the second face image can be understood as the face image during face registration, or can also be understood as the face image saved in the identity database.
  • the identity database stores identity information and the facial features corresponding to each identity information. The following will take the first face image as the face image that needs face recognition and the second face image as the face image when face registration is used as an example.
  • the first camera and the second camera belong to different types of cameras, that is, the first face image and the second face image can be understood as different types of face images.
  • the first face image is an RGB face image
  • the second face image may be an IR face image.
  • the first face image is an IR face image
  • the second face image is an RGB face image.
  • other types of face images, etc. which are not limited in the embodiment of the present disclosure.
  • the specific description of the first camera and the second camera please refer to the foregoing embodiment, which will not be described in detail here.
  • the reference similarity is the degree of similarity between the first face image belonging to the user corresponding to the second face image in the identity database, that is, the reference similarity can be used to represent the first face image and the second face image. Face images correspond to the same How similar people are.
  • the electronic device can obtain the reference similarity through the comparison between the facial features.
  • an embodiment of the present disclosure also provides a method for acquiring the face features of the second face image, such as the first Before the face feature is compared with the pre-stored second face feature, the method shown in Figure 1 further includes:
  • This embodiment does not limit the method for extracting the facial features of the second facial image.
  • the facial features of the second facial image can be extracted through a neural network completed in advance to obtain the second facial features.
  • a local binary pattern (local binary patterns, LBP) method can also be used to extract the face features of the second face image.
  • LBP local binary patterns
  • Another example is the sift feature extraction method, the geometric feature facial feature extraction method, the facial feature extraction method based on template matching, etc., to extract the facial features of the second face image. It can be understood that this embodiment does not uniquely limit how to extract the facial features of the second facial image. In this embodiment, by storing the second facial feature in the electronic device, it can provide guarantee for facial recognition.
  • the reference similarity can be compared with the similarity threshold (which can be understood as a static similarity threshold). If the reference similarity is not less than the similarity threshold, it can be determined that the first facial feature and the second facial feature correspond to the same person. If the reference similarity is less than the similarity threshold, it can be determined that the first facial feature and the second facial feature correspond to different people.
  • the similarity threshold which can be understood as a static similarity threshold
  • an embodiment of the present disclosure also provides a method for using a dynamic similarity threshold to determine whether the first facial feature and the second facial feature correspond to the same person. For example, determining whether the first face feature and the second face feature correspond to the same person according to the reference similarity, including:
  • the reference false alarm rate and the similarity threshold it is determined whether the first facial feature and the second facial feature correspond to the same person; wherein, different false alarm rates correspond to different similarity thresholds.
  • different false alarm rates correspond to different similarity thresholds, that is, there is a corresponding relationship between the false alarm rate and the similarity threshold.
  • the similarity threshold value corresponding to different false alarm rates is not limited in the embodiment of the present disclosure.
  • the corresponding relationship between the false alarm rate and the similarity threshold can be set by the user, or can also be set independently by the electronic device, etc., which is not limited in the embodiment of the present disclosure.
  • the reference false alarm rate in the embodiment of the present disclosure is a false alarm rate determined by the electronic device, such as a false alarm determined by the electronic device from the correspondence between the false alarm rate and the similarity threshold. rate.
  • the relationship between the false alarm rate and the similarity threshold is as follows: when the false alarm rate is 1 in 10,000, the similarity threshold is 0.7; when the false alarm rate is 1 in 100,000, the similarity threshold can be 0.8 ; When the false alarm rate is one in a million, the similarity threshold can be 0.9; when the false alarm rate is one in ten million, the similarity threshold is 0.98. Therefore, after the reference false alarm rate is determined, the electronic device can determine the similarity threshold according to the reference false alarm rate, and thereby determine the first face feature and the similarity threshold according to the obtained reference similarity and the determined similarity threshold. Whether the second face feature corresponds to the same person. It can be understood that the disclosed embodiment does not limit how the electronic device determines the reference false alarm rate. For example, the electronic device can be determined by a user inputting a definite instruction, or by other methods.
  • different similarity thresholds are obtained through different false alarm rates to determine the first face feature Whether it corresponds to the same person with the second face feature, avoiding the use of a fixed similarity threshold to authenticate the face, which can dynamically determine the similarity used to measure the relationship between the two face images, and improve Improve the accuracy of face recognition.
  • the embodiment of the present disclosure also provides a method for determining whether the first facial feature and the second facial feature correspond to the same person, such as determining whether the first facial feature and the second facial feature correspond to the reference similarity Corresponding to the same person, including:
  • the threshold information is obtained based on the similarity of the positive sample pair and the similarity of the negative sample pair and the preset different false alarm rates; wherein, the positive sample pair and the negative sample pair are based on the first type image and the second type image Obtained, each positive sample pair includes two images, and the faces in the two images correspond to the same person; each negative sample pair includes two images, and the faces in the two images correspond to different people, and the positive The similarity between the sample pair and the negative sample pair is determined by the pre-trained neural network.
  • the threshold information may include a first threshold and a second threshold, so that the electronic device may determine a normalized reference similarity according to the reference similarity and the first threshold and the second threshold, where the The reference similarity is between the first threshold and the second threshold, and in the threshold information, the reference similarity is closest to the first threshold and the second threshold.
  • the first type image and the second type image are obtained by different types of cameras.
  • the first threshold and the second threshold can be determined from the threshold information by referring to the similarity, so that the electronic device can determine the normalized reference similarity according to the first threshold and the second threshold.
  • the normalized reference similarity is the final similarity used to determine whether the first facial feature and the second facial feature correspond to the same person. For example / the reference similarity value in T (nl) (such as a first threshold value) between T (n) (as a second threshold value) and then return the reference of the degree of similarity may be determined as a 0.3 ⁇ n-1 >10 + 0.1*(Reference similarity-T(nl))*(T(n)-T(nl)). It can be understood that the above is only an example of a normalization method, and should not be construed as a limitation to this embodiment.
  • the electronic device can use a fixed similarity threshold to determine whether the first facial feature and the second facial feature correspond to the same person.
  • the electronic device can also use a dynamic similarity threshold (that is, different similarity thresholds are obtained according to different false alarm rates) to determine whether the first facial feature and the second facial feature correspond to the same person.
  • the implementation of this embodiment can further improve the accuracy for determining whether the first facial feature and the second facial feature correspond to the similarity of the same person, and improve the accuracy of face authentication.
  • the embodiment of the present disclosure also provides a face recognition method, which determines whether the first face feature and the second face feature correspond to the same person according to the reference similarity, the reference false alarm rate, and the similarity threshold, including:
  • the second facial feature with the highest similarity and the first facial feature is greater than the similarity threshold, it is determined that the second facial feature with the highest similarity corresponds to the same person as the first facial feature.
  • the electronic device can separately obtain the reference similarity between the first facial feature and the at least two second facial features, so as to determine the one with the highest similarity to the first facial feature from the at least two reference similarities The second face feature, however Then compare whether the reference similarity between the second face feature with the highest similarity and the first face feature is greater than the similarity threshold (obtained according to different false alarm rates), if it is greater, it means that the second with the highest similarity
  • the face feature corresponds to the same person as the first face feature.
  • the number of normalized reference similarities obtained by the electronic device according to the reference similarities between the first face feature and the at least two second face features also includes at least two. Therefore, after the normalized reference similarity is determined, the electronic device can also determine the second face feature with the highest similarity to the first face feature according to the normalized reference similarity, and the second face feature is similar to the first face feature. If the normalized reference similarity between the second face feature with the highest facial feature similarity and the first face feature is greater than the similarity threshold (which can be obtained according to different false alarm rates), it can be determined as A second face feature with the highest degree of facial feature similarity belongs to the same face as the face in the first face feature, that is, corresponds to the same person.
  • the similarity threshold which can be obtained according to different false alarm rates
  • the electronic device needs to compare whether the face image during registration and the face image during face recognition correspond to the same person. Therefore, the embodiment of the present disclosure is for the electronic device that obtains the face image during face registration. And whether the electronic device that obtains the face image during face recognition is the same type (or the same) electronic device is not limited.
  • the applicant of the present disclosure found in the process of implementing the embodiments of the present disclosure that traditional face recognition methods often restrict the image type to be authenticated and the image type registered to the same image type. If the registration process uses RGB images, the authentication process also needs to be used RGB images, thus limiting the application of traditional face recognition schemes in scenes involving multiple types of cameras.
  • the embodiment of the present disclosure provides a face recognition solution for scenes involving multiple types of cameras.
  • the face image of the second face image obtained by one type of camera is used as the base library feature, and another The face feature of the first face image acquired by the type camera is compared with the base library feature, and face recognition is realized according to the comparison result, so that the face recognition method provided by the embodiment of the present disclosure can be applied to more scenes. It is convenient for face authentication, and the camera for face registration is not limited, which improves the convenience of face registration.
  • the user can complete the face registration through the mobile phone, that is, the registration process is performed by the face image taken by the camera set on the mobile phone. Since the mobile phone is usually set with a visible light camera (such as an RGB camera), the registered face The image is the second face image taken by the RGB camera. Then the registered face image is sent to the vehicle-mounted device through the mobile phone or via the server through the mobile phone, and the vehicle-mounted device stores the registered face image, that is, the vehicle-mounted device stores the second face image.
  • a visible light camera such as an RGB camera
  • the user can capture the second face image through the visible light camera set on the mobile phone, and then send the second face image to the server or vehicle-mounted device, thereby completing the registration of the second face image on the server or vehicle-mounted device After the registration is completed, the second facial feature extracted based on the second facial image is saved.
  • the user collects the face image (ie the first face image) that needs to be recognized through the vehicle-mounted device.
  • the vehicle-mounted device can be equipped with an infrared camera, so that the IR face image taken by the infrared camera can be used as the waiting
  • the image for face recognition is the first face image.
  • the in-vehicle device extracts the facial features of the IR image, and then compares the facial features of the IR image with the facial features of the registered RGB image to determine whether the user to be identified and the registered user are the same person.
  • the first scenario shown in the embodiment of the present disclosure can be applied to a driver status monitoring system, a ride management system, a car rental management system, a car-hailing management system, and so on.
  • a driver status monitoring system the system often includes several modules such as face recognition, driver motion detection, driver fatigue detection, and driver attention monitoring. Therefore, in the face recognition phase of the above system, the method shown in scene 1 can be used to perform face recognition to determine the driver’s body. Or the identity of the person renting the vehicle, etc.
  • the face recognition method provided in the embodiments of the present disclosure can also be applied to a community access control management system and a security deployment control system, etc., for example, a community access control management system:
  • Registration process Users (residents in a certain community) can register their faces through their mobile phones, that is, the visible light camera (such as an RGB camera) set on the mobile phone obtains the user's face image, which is the second face image. Then the registered face image is sent to the access control device via the mobile phone or via the server via the mobile phone, and the access control device stores the second face image. Alternatively, the user can capture the second face image through the visible light camera set on the mobile phone, and then send the second face image to the access control device, so that the access control device completes the registration of the second face image. After completion, save the second face feature extracted based on the second face image.
  • the visible light camera such as an RGB camera
  • the access control device can obtain the user's face image, that is, the first face image, through an infrared camera (such as an IR camera). Then the access control device extracts the face features of the first face image to obtain the first face feature. The access control will compare the first face image taken by the IR camera, that is, the face feature of the IR image with the registered face feature through RGB The facial features of the RGB images captured by the camera are compared to determine whether the user to enter the cell and the registered user are the same person.
  • an infrared camera such as an IR camera
  • the methods provided in the embodiments of the present disclosure can also be applied to more scenarios, such as the methods provided in the embodiments of the present disclosure.
  • terminal unlocking such as mobile phone unlocking and bank identity authentication systems, etc.
  • the embodiment of the present disclosure does not limit it.
  • the mobile phone unlocking application the user can register the face through the mobile phone, and then every time the mobile phone is used, the mobile phone can execute the method provided in the embodiments of the present disclosure to realize the recognition of the face image.
  • the mobile phone used for face registration and the mobile phone used for face recognition can be different mobile phones, that is, the camera type of the mobile phone used for face registration and the mobile phone used for face recognition can be different.
  • Another example is the financial identity authentication system, that is, the bank identity authentication system.
  • the bank identity authentication system When a user opens a bank account, he can use the bank terminal to register his face, and then in the subsequent banking business process, other bank terminals can perform the implementation of this disclosure
  • the method provided in the example realizes the recognition of facial images to ensure the security of the user's banking business.
  • the type of camera in the bank terminal during face registration and the bank terminal during face recognition may be different.
  • the applicant of the present disclosure further discovered in the process of practicing the embodiments of the present disclosure that the same person took two face images through an RGB camera and an IR camera, and then used these two images to form an RGB image, an IR image, and a mixed image of RGB and infrared images. These 3 sets of mixed comparison combinations may have different similarities obtained through the same neural network.
  • two different people take four face images through RGB camera and IR camera respectively, and then use these four face images to form different image combinations, such as user 1RGB image and user 2RGB image, user 1IR image and user 2IR Image, user 1RGB image and user 2IR image, user 1IR image and user 2RGB image.
  • image combinations such as user 1RGB image and user 2RGB image, user 1IR image and user 2IR Image, user 1RGB image and user 2IR image, user 1IR image and user 2RGB image.
  • the embodiments of the present disclosure provide a technical solution for training a neural network (NN), which can effectively reduce or even avoid the above-mentioned problems.
  • the neural network in the embodiment of the present disclosure may include a deep neural network (DNN ⁇ convolutional neural network, etc.), and the embodiment of the present disclosure does not limit the specific form of the neural network.
  • FIG. 2 is a schematic flowchart of a neural network training method provided by an embodiment of the present disclosure.
  • the neural network training method can be applied to a neural network training device, and the neural network training method can also be applied to electronic equipment.
  • the electronic device may include a server or a terminal device.
  • the terminal device may include a mobile phone, a tablet computer, a desktop computer, a personal palmtop computer, a vehicle-mounted device, a vehicle-mounted robot, etc.
  • the embodiment of the present disclosure does not uniquely limit the specific form of the electronic device. It can be understood that the neural network training method can also be applied to a face recognition device. In other words, the method shown in FIG.
  • the method shown in FIG. 1 may be executed by the same type of electronic device, or may be executed by different types of electronic devices, etc., which are not limited in the embodiment of the present disclosure.
  • the same type of electronic equipment is executed, that is, the method shown in FIG. 1 is executed by the terminal device, and the method shown in FIG. 2 may also be executed by the terminal device.
  • the method shown in FIG. 2 may be executed by the same device as the method shown in FIG. 1, etc., which is not limited in the embodiment of the present disclosure.
  • the training images used in the neural network training process are called image samples.
  • the image samples include annotation information.
  • the annotation information can include but is not limited to at least one of the following: Face ID in the image (also understood as face annotation information ), the type of the image, etc., where the face ID corresponding to the same person is the same, and the type of the image is used to represent the type of camera corresponding to the image collection.
  • the neural network training method includes:
  • a first type of image sample and a second type of image sample the first type of image sample and the second type of image sample are taken by different types of cameras, and the first type of image sample and the second type of image sample include a human face .
  • the first type image sample includes at least a human face image
  • the second type image sample includes at least a human face image
  • the first type image sample and the second type image sample are composed of different types
  • the camera gets. If the first type of image sample is obtained by an RGB camera, the second type of image sample can be obtained by another type of camera such as an IR camera. It can be understood that, for the specific implementation of different types of cameras, reference may be made to the manner shown in FIG. 1, which will not be repeated here.
  • the number of image samples of the first type and the number of image samples of the second type are not limited in the embodiment of the present disclosure.
  • the number of image samples of the first type and the number of image samples of the second type can be measured by the training degree of the neural network, and so on.
  • the electronic device can train the neural network through image samples taken by two different types of cameras, so that the neural network can learn the feature extraction capabilities of two different types of images during the training process.
  • the neural network based on the training can perform feature extraction on any of the two types of images, and ensure the accuracy of feature extraction, thereby satisfying the need for face registration and face registration based on these two types of cameras.
  • Identified application requirements That is to say, when training a neural network, not only one type of image sample is used for training, but multiple types of image samples are used for training, so that the trained neural network can effectively obtain the characteristics of different types of image samples.
  • the neural network training method may include: for example, inputting a first type of image sample and a second type of image sample into the neural network, and comparing the first type of image sample and the second type of image sample through the neural network After processing, output the prediction result of the neural network for the first type of image sample and the prediction result of the second type of image sample (that is, the face prediction result of each image sample)> Then calculate the face of the image sample through the predetermined loss function
  • the loss between the prediction result and the annotation information of the image sample that is, the real face annotation information
  • the loss between the prediction result of the first type of image sample and the annotation information is calculated through a predetermined loss function, and the second type of image Kind The loss between the predicted results of this book and the labeled information.
  • the loss is transmitted back to the neural network, and the neural network adjusts the parameter values of the network parameters such as the convolution kernel and the weight according to the loss of the reverse return.
  • the neural network adjusts the parameter values of the network parameters such as the convolution kernel and the weight according to the loss of the reverse return.
  • the predetermined training completion condition for example, the loss is less than a predetermined threshold, Or the number of iterative training exceeds the set number, etc.
  • training a neural network based on the first type of image samples and the second type of image samples includes: pairing the first type of image samples with the second type of image samples to obtain a mixed type of the first type of image samples and the second type of image samples Image sample
  • the neural network is trained.
  • the first type image sample and the second type image sample are paired, that is, each pair of mixed type image samples in the mixed type image sample includes the first type image sample and the second type image sample, thereby forming two Different types of image samples for training.
  • the neural network is trained through the first type of image samples, the second type of image samples, and the mixed type of image samples, so that the neural network can not only learn the feature extraction capabilities of each single type of image, but also better learn together
  • the feature extraction capabilities of these two different types of images improve the accuracy of neural network feature extraction, so that the trained neural network can be effectively applied to the face recognition method provided by the embodiment of the present disclosure.
  • training a neural network according to the first type image samples, the second type image samples and the mixed type image samples includes:
  • the electronic device can obtain the face prediction result of the first type image sample, the face prediction result of the second type image sample, and the face prediction result of the mixed type image sample respectively through the neural network. Then based on the difference between the face prediction result and the face annotation result of the first type image sample, the difference between the face prediction result and the face annotation result of the second type image sample, and the face prediction of the mixed type image sample The difference between the result and the face labeling result, train the neural network.
  • the neural network can be trained based on the loss between the face prediction results of the first type of image samples and the face labeling results, and the loss between the face prediction results of the second type image samples and the face labeling results can be trained Neural network, and training the neural network based on the loss between the face prediction results of the mixed type image samples and the face annotation results. It can be understood that, for the specific training method, reference may be made to the description of the foregoing embodiment, which will not be described in detail here.
  • the embodiments of the present disclosure also provide a training method.
  • the neural network includes a first classifier, a second classifier, and a hybrid classifier.
  • the network obtains the face prediction results of the first type image sample, the second type image sample, and the mixed type image sample, including: inputting the characteristics of the first type image sample into the first classifier to obtain the person of the first type image sample Face prediction result; Input the second type image sample into the second classifier to obtain the face prediction result of the second type image sample; input the features of the mixed type image sample into the hybrid classifier to obtain the face prediction result of the mixed type image sample .
  • the classifier can be used to classify the face prediction results of different types of image samples.
  • the classifier can obtain the face prediction results of the image samples input to the classifier, so that the loss can be determined according to the output of the classifier And then back to the neural network to train the neural network.
  • the first classifier can output the face prediction results of the first type of image samples
  • the second classifier can output the face prediction results of the second type of image samples
  • the hybrid classifier can output the mixed type image samples. The result of face prediction.
  • Outputting face prediction results through a classifier corresponding to the type of image sample can effectively improve the accuracy of the output face prediction results of the classifier, and then improve the neural network training that supports the extraction of mixed types of image features based on the output results of the classifier
  • the accuracy of the neural network improves the accuracy and robustness of facial feature extraction from different types of images.
  • Week 3 is a schematic diagram of a training process provided by an embodiment of the present disclosure.
  • the image samples of the first type are RGB image samples, and the image samples included in the RGB image sample library are all RGB image samples;
  • the image samples of the second type are IR image samples, and the image samples included in the IR image sample library are all IR images.
  • the mixed type image samples are RGB&IR image samples.
  • the mixed type image sample library includes some RGB image samples and some IR image samples, which are expressed as RGB&IR image samples.
  • the RGB classifier is used to classify the RGB image samples in the RGB image sample library,
  • the classification result of a certain RGB image sample indicates the probability that the face in the RGB image sample belongs to each face ID category in the RGB image sample library;
  • the IR classifier is used to classify the IR image samples in the IR image sample library, and an IR image
  • the classification result of the sample indicates the probability that the face in the IR image sample belongs to each face ID category in the IR image sample library;
  • the RGB&IR classifier is used to classify the RGB image samples and IR image samples in the mixed type image sample library.
  • the RGB&IR image sample represents the probability that the face in the image sample belongs to each face ID category in the mixed-type image sample library.
  • the "&" in the RGB&IR image sample can indicate that the image sample input to the hybrid classifier, that is, the RGB&IR classifier, may be an RGB type image sample or an IR type image sample. Therefore, the "in this disclosure” & ⁇ is understood to have a limiting meaning to the present disclosure.
  • the neural network can output the characteristics of the RGB image samples, the IR image samples, and the RGB&IR image samples through the feature extractor. feature. Then, the characteristics of the RGB image sample, the characteristics of the IR image sample, and the characteristics of the RGB&IR image sample are input to the RGB classifier, the IR classifier and the RGB&IR classifier, respectively. From this / the neural network outputs the face prediction results of each image sample through the classifier.
  • the face prediction results of each image sample are compared with the face annotation results of each image sample to obtain the face prediction of each image sample
  • the result is the loss of the face annotation result of each image sample, and then the loss is propagated back to the entire neural network to train the entire neural network.
  • the trained neural network can accurately and effectively extract the features of different types of images, thereby improving the performance of face recognition. Accuracy and efficiency.
  • the method shown in Figure 2 also includes:
  • the first classifier, the second classifier and the hybrid classifier are removed from the trained neural network to obtain a neural network for face recognition.
  • the first classifier, the second classifier, and the hybrid classifier can be used to assist in training the neural network.
  • the first classifier, the second classifier, and the hybrid classifier may not be included in the neural network. Therefore, after the training of the neural network training device is completed, the first classifier and the second classifier in the neural network can be Remover and hybrid classifier.
  • the efficiency of the neural network output features can be effectively improved, and the difference in similarity caused by different types of images through the same neural network to extract features can be reduced or avoided. .
  • the present disclosure in order to obtain the threshold information used to determine the normalized reference similarity shown in FIG. 1, the present disclosure also provides a method for obtaining threshold information, as shown below:
  • the method shown in Figure 2 further includes:
  • each positive sample pair includes two images, and the faces in the two images in each positive sample pair correspond to the same person; each Each negative sample pair includes two images, and the faces in the two images in each negative sample pair correspond to different people;
  • the neural network determines the similarity of the positive sample pair and the similarity of the negative sample pair respectively; according to the similarity of the positive sample pair and the similarity of the negative sample pair and preset different false alarm rates, determine the threshold information,
  • the threshold information includes a first threshold and a second threshold.
  • the first type image includes at least a human face image
  • the second type image includes at least a human face image
  • the first type image and the second type image are obtained by different types of cameras.
  • RGB images of several people can be obtained through an RGB camera
  • IR images of several people can be obtained through an IR camera.
  • each person includes M RGB images and M IR images. Both M and N are integers greater than or equal to 2.
  • obtaining a positive sample pair according to the first type image and the second type image includes:
  • first type image and the second type image are paired to obtain a positive sample pair of the mixed image.
  • each person includes M RGB images and M IR images as an example
  • the M RGB images included by each person are paired to obtain M*(M-1)/2 RGB positive sample pairs; pair M IR images included by each person / get M* (M-1) /2 positive IR sample pairs; pair M RGB images and M IR images included by each person, Obtain M*M positive RGB&IR sample pairs.
  • each person's image can be paired with other images of different people to form a negative sample pair.
  • the negative sample pair may include the IR image of the first user, the IR image of the second user; the RGB image of the first user, the RGB image of the second user; and the first user IR image of the second user, RGB image of the second user.
  • the neural network completed through training outputs the facial features of the positive sample pairs and the facial features of the negative sample pairs, according to
  • the facial features of the positive sample pair obtain the similarity of the positive sample pair
  • the similarity of the negative sample pair is obtained according to the facial feature of the negative sample pair.
  • the target false alarm rate may be understood as a preset or selected false alarm rate, and the specific value of the target false alarm rate is not limited in the embodiment of the present disclosure.
  • Table 1 is a kind of threshold information provided by an embodiment of the present disclosure.
  • the false alarm rate can be independently set by the electronic device, etc.
  • the embodiment of the present disclosure does not limit the specific value of the false alarm rate.
  • the target false alarm rate is 0.00001
  • the positive sample pair and the negative sample pair _ have a total of 1,000,000 pairs, so there are 10 false positive sample pairs. Then the 10 false positive sample pairs can be found from the positive sample pair and the negative sample pair, and then the sample pair with the lowest similarity is selected from the sample pair, so the similarity of the sample pair with the lowest similarity is the target false positive
  • the threshold corresponding to the rate is T( 5 x. It is understandable that the embodiment of the present disclosure does not limit the method of how to select the sample pair with the lowest similarity, for example, it can be obtained by a ranking method.
  • the sample pair with the lowest similarity, etc. and each corresponding relationship shown in Table 1 is only an example, and the specific value is not limited in the embodiment of the present disclosure.
  • the neural network is tested according to a large number of images, so as to obtain thresholds under different false alarm rates, and then threshold information can be obtained, so that when the neural network is applied, Different threshold information (such as the first threshold and the second threshold) may be used according to different false alarm rates to determine the normalized reference similarity.
  • Different threshold information such as the first threshold and the second threshold
  • Table 1 can refer to the implementation shown in FIG. 1.
  • the electronic device can obtain the reference similarity between the first face feature and the second face feature according to the threshold information in Table 1 and the electronic device. , Determining the normalized reference similarity, so as to determine whether the first facial feature and the second facial feature correspond to the same person according to the normalized reference similarity.
  • FIG. 4 is a schematic structural diagram of a face recognition device provided by an embodiment of the present disclosure.
  • the face recognition device can be used to execute the face recognition method shown in FIG.
  • the face recognition device includes:
  • the first obtaining unit 401 is configured to obtain the first face image through the first camera;
  • the first extraction unit 402 is configured to extract the first face feature of the first face image;
  • the comparison unit 403 is used to compare the first face feature with the second face feature to obtain a reference similarity.
  • the second face feature is obtained by extracting the feature of the second face image acquired by the second camera, and the second The camera and the first camera are different types of cameras;
  • the determining unit 404 is configured to determine whether the first face feature and the second face feature correspond to the same person according to the reference similarity.
  • the applicant of the present disclosure found in the process of implementing the embodiments of the present disclosure that traditional face recognition methods often restrict the image type to be authenticated and the image type registered to the same image type. If the registration process uses RGB images, the authentication process also needs to be used RGB images, thus limiting the application of traditional face recognition schemes in scenes involving multiple types of cameras.
  • the embodiment of the present disclosure provides a face recognition solution for scenes involving multiple types of cameras.
  • the face image of the second face image obtained by one type of camera is used as the base library feature, and another The face feature of the first face image acquired by the type camera is compared with the base library feature, and face recognition is realized according to the comparison result, so that the face recognition method provided by the embodiment of the present disclosure can be applied to more scenes. It is convenient for face authentication, and the camera for face registration is not limited, which improves the convenience of face registration.
  • the first camera is a thermal imaging camera
  • the second camera is a visible light camera
  • the first camera is a visible light camera
  • the first camera is a thermal imaging camera
  • the determining unit 404 is specifically configured to determine whether the first face feature and the second face feature correspond to the same person according to the reference similarity, the reference false alarm rate, and the similarity threshold; wherein, different false alarm rates correspond to different The similarity threshold.
  • different similarity thresholds are obtained through different false alarm rates, so as to determine whether the first facial feature and the second facial feature correspond to the same person, avoiding the use of a fixed similarity threshold to treat people.
  • the face authentication scheme can dynamically determine the similarity used to measure the relationship between two face images, which improves the efficiency and accuracy of face authentication or face recognition.
  • the determining unit 404 is specifically configured to determine the normalized reference similarity according to the reference similarity and threshold information; and determine the first face feature and the second face feature according to the normalized reference similarity Whether it corresponds to the same person.
  • the normalized reference similarity is determined by referring to the similarity and preset information, so as to determine whether the first facial feature and the second facial feature are based on the normalized reference similarity Corresponding to the same person. Effectively improve the scheme of using a fixed threshold to recognize faces, which can dynamically determine the similarity used to measure the relationship between two face images (that is, the normalized reference similarity), which improves The efficiency and accuracy of face recognition.
  • the first extraction unit 402 is specifically configured to input the first face image into a pre-trained neural network, and output the first face feature of the first face image through the neural network; wherein the neural network is based on the first face image.
  • the type image samples and the second type image samples are obtained through training, the first type image samples and the second type image samples are taken by different types of cameras, and the first type image samples and the second type image samples include human faces.
  • the neural network is trained through different types of image samples, and then the neural network is applied, such as face recognition, etc., to improve the efficiency and accuracy of face recognition.
  • the neural network is based on the first type of image samples, the second type of image samples, and the mixed type of image samples.
  • the mixed type image samples are obtained by pairing the first type image samples and the second type image samples.
  • the first camera includes a vehicle-mounted camera
  • the first acquisition unit 401 is specifically configured to acquire a first face image through the vehicle-mounted camera, and the first face image includes a face image of a user of the vehicle.
  • the embodiments of the present disclosure can be effectively applied to a driver monitoring system, thereby improving the efficiency of face recognition of the driver.
  • the user includes one or more of the person driving the vehicle, the person riding the vehicle, the person repairing the vehicle, the person refueling the vehicle, and the person controlling the vehicle.
  • the first obtaining unit 401 is specifically configured to obtain a first face image through a vehicle-mounted camera when a trigger instruction is received;
  • the first acquiring unit 401 is specifically configured to acquire the first face image through the on-board camera when the vehicle is running;
  • the first acquiring unit 401 is specifically configured to acquire the first face image through the vehicle-mounted camera when the running speed of the vehicle reaches the reference speed.
  • the second face image is an image for face registration of a car user.
  • the face recognition device further includes:
  • the second acquiring unit 405 is configured to acquire a second face image through the second camera
  • the second extraction unit 406 is configured to extract the second face feature of the second face image
  • the saving unit 407 is used to save the second face feature of the second face image.
  • FIG. 6 is a schematic structural diagram of a neural network training device provided by an embodiment of the present disclosure.
  • the neural network training device can be used to execute the face recognition method shown in FIG.
  • the neural network training device includes:
  • the acquiring unit 601 is configured to acquire a first type of image sample and a second type of image sample, the first type of image sample and the second type of image sample are taken by different types of cameras, and the first type of image sample and the second type of image sample Including human faces;
  • the training unit 602 is used to train the neural network according to the first type image samples and the second type image samples.
  • the neural network is trained by using facial images captured by different types of cameras, which can effectively improve the accuracy of the facial features output by the neural network; at the same time, face recognition is performed and the neural network is used to extract human faces It also effectively improves the accuracy of face recognition.
  • the training unit 602 includes:
  • the pairing subunit 6021 is configured to pair the first type image sample and the second type image sample to obtain a mixed type image sample of the first type image sample and the second type image sample;
  • the training subunit 6022 is used to train the neural network according to the first type image sample, the second type image sample and the mixed type image sample.
  • the first type image sample and the second type image sample are paired, that is, each pair of mixed type image samples in the mixed type image sample includes the first type image sample and the second type image sample, thereby forming two Different types of image samples for training.
  • the neural network is trained through the first type of image samples, the second type of image samples, and the mixed type of image samples, so that the neural network can not only learn the feature extraction capabilities of each single type of image, but also better learn together
  • the feature extraction capabilities of these two different types of images improve the neural network
  • the accuracy of network feature extraction enables the trained neural network to be effectively applied to the face recognition method provided by the embodiments of the present disclosure.
  • the training subunit 6022 is specifically configured to obtain the face prediction result of the first type of image sample, the face prediction result of the second type of image sample, and the face prediction result of the mixed type image sample through the neural network; and The difference between the face prediction results and the face annotation results of the first type image samples, the difference between the face prediction results and the face annotation results of the second type image samples, and the face prediction results and people of the mixed type image samples Training the neural network for the difference in face annotation results.
  • the neural network includes a first classifier, a second classifier, and a hybrid classifier.
  • the training subunit 6022 is specifically used to input the features of the first type image sample into the first classifier to obtain the first type The face prediction result of the image sample; and input the second type image sample into the second classifier to obtain the face prediction result of the second type image sample; and input the features of the mixed type image sample into the hybrid classifier, Obtain the face prediction results of the mixed type image samples.
  • the above device further includes:
  • the neural network application unit is used to remove the first classifier, the second classifier and the hybrid classifier from the trained neural network to obtain a neural network for face recognition.
  • FIG. 9 is a schematic structural diagram of an electronic device provided by an embodiment of the present disclosure.
  • the electronic device includes a processor 901, a memory 902, and an input-output interface 903.
  • the processor 901, the memory 902, and the input-output interface 903 are connected to each other by a connecting wire, which may include a bus or the like.
  • the input and output interface 903 can be used to input data and/or signals, and output data and/or signals.
  • the memory 902 includes but is not limited to random access memory (random access memory, RAM ⁇ read-only memory, ROM X erasable programmable read only memory, EPROM ⁇ or portable read-only memory)
  • random access memory random access memory
  • ROM X erasable programmable read only memory
  • a memory compact disc read-only memory, CD-ROM
  • the processor 901 may be one or more, and the one or more processors may be: one or more central processing units (CPU), and/or / or one or more acceleration units.
  • the CPU can be a single-core CPU or a multi-core CPU.
  • the acceleration unit may include, but is not limited to, graphics processing unit (graphics processing unit, GPU ⁇ programmable gate array (FPGA), etc.).
  • processor provided in the embodiment of the present disclosure may also be another type of processor, and the embodiment of the present disclosure does not uniquely limit the type of the processor.
  • memory provided by the embodiment of the present disclosure may also be other types of memory, etc., and the embodiment of the present disclosure does not limit the type of the memory.
  • each operation can also correspond to the corresponding description of the method embodiment shown in FIG. 1.
  • reference may also be made to the corresponding description of the method embodiment shown in FIG. 2.
  • the implementation of each operation can also refer to the corresponding description of the embodiment shown in FIG. 4 and FIG. 5.
  • the implementation of each operation can also refer to the corresponding description of the embodiments shown in FIG. 6 to FIG. 8.
  • the processor 901 may be used to execute the methods shown in step 101 to step 104.
  • the processor may also be used to control the input/output interface to obtain the first face image, etc.
  • the embodiment of the present disclosure does not uniquely limit how to obtain the first face image.
  • the processor may also be used to execute the methods shown in step 201 and step 202.
  • the processor 901 may also be configured to execute methods executed by the first acquiring unit 401, the first extracting unit 402, the comparing unit 403, the determining unit 404, and so on.
  • the processor 901 may also be used to execute methods executed by the acquiring unit 601 and the training unit 602, and so on.
  • the embodiment of the present disclosure also provides a computer-readable storage medium. All or part of the procedures in the foregoing method embodiments may be completed by a computer program instructing relevant hardware.
  • the program may be stored in the foregoing computer storage medium. When the program is executed, it may include the procedures of the foregoing method embodiments.
  • the computer-readable storage medium may be an internal storage unit of the face recognition device or neural network training device of any of the foregoing embodiments, such as the hard disk or memory of the face recognition device or neural network training device.
  • the aforementioned computer-readable storage medium may also be an external storage device of the aforementioned face recognition device or neural network training device, for example, a plug-in hard disk equipped on the aforementioned face recognition device or neural network training device, or a smart media card (smart media card). , SMC), secure digital (SD) card / flash card, etc. Further, the aforementioned computer-readable storage medium may also include both the internal storage unit of the aforementioned facial recognition device or neural network training device and also an external storage device.
  • the above-mentioned computer-readable storage medium is used to store the above-mentioned computer program and other programs and data required by the above-mentioned face recognition device or neural network training device.
  • the aforementioned computer-readable storage medium can also be used to temporarily store data that has been output or will be output.
  • the embodiments of the present disclosure also provide a computer program program product for storing computer-readable instructions, which when executed, cause a computer to execute any of the above-mentioned embodiments. The method described.
  • the computer program product can be specifically implemented by hardware, software or a combination thereof.
  • the computer program product is specifically embodied as a computer storage medium.
  • the computer program product is specifically embodied as a software product / for example, a software development kit (software development kit (SDK)) and so on.
  • SDK software development kit
  • the computer may be implemented in whole or in part by software, hardware, firmware, or any combination thereof.
  • software it can be implemented in the form of a computer program product in whole or in part.
  • the computer program product includes one or more computer instructions.
  • the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.
  • the computer instructions may be stored in a computer-readable storage medium or transmitted through the computer-readable storage medium.
  • the computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or data center integrated with one or more available media.
  • the available medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape> optical media (e.g., DVD), or a semiconductor medium (for example / SSD (solid state disk, SSD)) and the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Biophysics (AREA)
  • Molecular Biology (AREA)
  • Biomedical Technology (AREA)
  • General Engineering & Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Computational Linguistics (AREA)
  • Software Systems (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Human Computer Interaction (AREA)
  • Multimedia (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Analysis (AREA)
  • Collating Specific Patterns (AREA)

Abstract

一种人脸识别方法、神经网络训练方法、装置及电子设备。其中,方法包括:通过第一摄像头获取第一人脸图像(101);提取所述第一人脸图像的第一人脸特征(102);将所述第一人脸特征与预先存储的第二人脸特征进行对比,获得参考相似度,所述第二人脸特征经第二摄像头获取的第二人脸图像的特征提取而得,所述第二摄像头与所述第一摄像头属于不同类型的摄像头(103);根据所述参考相似度确定所述第一人脸特征与所述第二人脸特征是否对应相同人(104)。

Description

人脸识别方法、 神经网络训练方法、 装置及电子设备 本申请要求于 2019年 02月 26日提交中国国家知识产权局、申请号为 2019101450249、 申请名称为" 人脸识别方法、 神经网络训练方法、 装置及电子设备〃 的中国专利申请的优 先权,其全部内容通过引用结合在本申请中。
技术领域
本公开涉及图像处理技术领域,尤其涉及一种人脸识别方法、 神经网络训练方法、 装 置及电子设备。
背景技术
随着人工智能和车辆行业的迅速发展,将最新的人工智能技术应用到量产车辆上已经 成为一个最具市场前景的方向。 目前车辆市场需求的人工智能产品包括但不限于辅助驾驶 系统、 驾驶员监控系统、 车辆运营管理系统等。 这些市场需求通常需要对驾驶员的人脸进 行识别,并以此为基础进行后续的管理和控制。
发明内容
本公开提供了一种人脸识别的技术方案以及一种神经网络训练的技术方案。
第一方面,本公开实施例提供了一种人脸识别方法,包括:
通过第一摄像头获取第一人脸图像;
提取所述第一人脸图像的第一人脸特征;
将所述第一人脸特征与预先存储的第二人脸特征进行对比,获得参考相似度,所述第 二人脸特征经第二摄像头获取的第二人脸图像的特征提取而得,所述第二摄像头与所述第 一摄像头属于不同类型的摄像头;
根据所述参考相似度确定所述第一人脸特征与所述第二人脸特征是否对应相同人。 本公开实施例中,在进行人脸识别时,可实现第一人脸图像与第二人脸图像的识别, 该第一人脸图像与该第二人脸图像通过不同类型的摄像头获取。 实施本公开实施例,通过 不同类型摄像头获取第一人脸图像与第二人脸图像,可使得本公开实施例所提供的人脸识 别方法应用于更多的场景,不仅方便人脸认证,而且对于人脸注册时的摄像头也不作限定, 提高了人脸注册的便利性。
第二方面,本公开实施例提供了一种神经网络训练方法,包括:
获取第一类型图像样本和第二类型图像样本,所述第一类型图像样本和所述第二类型 图像样本由不同类型的摄像头拍摄得到,且所述第一类型图像样本和所述第二类型图像样 本中包括人脸;
根据所述第一类型图像样本和所述第二类型图像样本训练神经网络。
本公开实施例中,通过采用不同类型摄像头拍摄得到的人脸图像来训练神经网络,可 有效提高该神经网络输出人脸特征的准确度;同时在进行人脸识别,应用该神经网络提取 人脸特征时,还有效提高了人脸识别的准确度。
第三方面,本公开实施例提供了一种人脸识别装置,包括:
第一获取单元,用于通过第一摄像头获取第一人脸图像;
第一提取单元,用于提取所述第一人脸图像的第一人脸特征;
对比单元,用于将所述第一人脸特征与预先存储的第二人脸特征进行对比,获得参考 相似度,所述第二人脸特征经第二摄像头获取的第二人脸图像的特征提取而得,所述第二 摄像头与所述第一摄像头属于不同类型的摄像头;
确定单元,用于根据所述参考相似度确定所述第一人脸特征与所述第二人脸特征是否 对应相同人。
第四方面,本公开实施例提供了一种神经网络训练装置,包括:
获取单元,用于获取第一类型图像样本和第二类型图像样本,所述第一类型图像样本 和所述第二类型图像样本由不同类型的摄像头拍摄得到,且所述第一类型图像样本和所述 第二类型图像样本中包括人脸;
训练单元,用于根据所述第一类型图像样本和所述第二类型图像样本训练神经网络。 第五方面,本公开实施例还提供了一种电子设备,包括:处理器和存储器;所述存储 器用于与所述处理器耦合,所述存储器还用于存储程序指令,所述处理器被配置为支持所 述电子设备执行上述第一方面的方法中相应的功能。
第六方面,本公开实施例还提供了一种电子设备,包括:处理器和存储器;所述存储 器用于与所述处理器耦合,所述存储器还用于存储程序指令,所述处理器被配置为支持所 述电子设备执行上述第二方面的方法中相应的功能。
第七方面,本公开实施例还提供了一种人脸识别系统,所述人脸识别系统包括:神经 网络训练装置和人脸识别装置;所述神经网络训练装置和所述人脸识别装置耦合;
其中,所述神经网络训练装置,用于训练神经网络;
所述人脸识别装置,用于应用所述神经网络训练装置所训练的神经网络。
第八方面,本公开实施例提供了一种计算机可读存储介质,所述计算机可读存储介质 中存储有指令,当其在计算机上运行时,使得计算机执行上述各方面所述的方法。
第九方面,本公开实施例提供了一种包含指令的计算机程序产品,当其在计算机上运 行时,使得计算机执行上述各方面所述的方法。
本公开申请人在实现本公开实施例过程中发现,传统的人脸识别方法往往限制认证的 图像类型和注册的图像类型为相同的图像类型,如注册过程采用 RGB 图像,则认证过程 也需采用 RGB 图像,由此限制了传统人脸识别方案在涉及多类摄像头场景中的应用。 本 公开实施例为涉及多类摄像头的场景提供了人脸识别解决方案,实施本公开实施例中,通 过将一类类型摄像头获取第二人脸图像的人脸图像作为底库特征,通过另一类型摄像头获 取的第一人脸图像的人脸特征与底库特征进行比对,根据比对结果实现人脸识别,使得本 公开实施例所提供的人脸识别方法应用于更多的场景,不仅方便人脸认证,而且对于人脸 注册时的摄像头也不作限定,提高了人脸注册的便利性。
附图说明
为了更清楚地说明本公开实施例或背景技术中的技术方案,下面将对本公开实施例或 背景技术中所需要使用的附图进行说明。
图 1是本公开实施例提供的一种人脸识别方法的流程示意图;
图 2是本公开实施例提供的一种神经网络训练方法的流程示意图;
图 3是本公开实施例提供的一种训练过程的示意图;
图 4是本公开实施例提供的一种人脸识别装置的结构示意图; 图 5是本公开实施例提供的另一种人脸识别装置的结构示意图;
图 6是本公开实施例提供的一种神经网络训练装置的结构示意图;
图 7是本公开实施例提供的一种训练单元的结构示意图;
图 8是本公开实施例提供的另一种神经网络训练装置的结构示意图;
图 9是本公开实施例提供的一种电子设备的结构示意图。
具体实施方式
为了使本公开的目的、 技术方案和优点更加清楚,下面将结合附图对本公开作进一步 ±也详细描述。
本公开的说明书和权利要求书及上述附图中的术语" 第 _〃、" 第二〃 等是用于区别不 同的对象,而不是用于描述特定顺序。 此外,术语" 包括〃 具有〃 以及它们任何变形, 意图在于覆盖不排他的包含。 例如包含了一系列步骤或单元的过程、 方法、 系统、 产品或 设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选 地还包括对于这些过程、 方法或设备固有的其他步骤或单元。
参见图 1 ,图 1是本公开实施例提供的一种人脸识别方法的流程示意图,该人脸识别 方法可应用于人脸识别装置,以及该人脸识别方法还可应用于电子设备,该电子设备可包 括服务器或终端设备,该服务器可包括任意类型的服务器,如云服务器等等,本公开实施 例不作限定。 该终端设备可包括手机、 平板电脑、 台式电脑、 车载设备、 驾驶员状况监控 系统、 乘车管理系统、 租车管理系统、 网约车管理系统等等,本公开实施例对于该终端设 备的具体形式不作唯一性限定。 以下以该人脸识别方法应用于电子设备为例来说明。
如图 1所示,该人脸识别方法包括:
101、 通过第一摄像头获取第一人脸图像。
本公开实施例中,该第一人脸图像可包括第一摄像头拍摄到的图像;或者,该第一人 脸图像还可包括通过第一摄像头拍摄的视频流数据中的任意帧图像等等,本公开实施例对 于该第一人脸图像的来源不作限定。
本公开实施例中,第一摄像头可为热成像摄像头,又或者,第一摄像头为可见光摄像 头。 其中,在第一摄像头为热成像摄像头的情况下,第二摄像头可为其他不同于热成像摄 像头的摄像头,如第二摄像头可为可见光摄像头。 而在第一摄像头为可见光摄像头的情况 下,第二摄像头可为其他不同于可见光摄像头的摄像头,如第二摄像头可为热成像摄像头。 一个示例中,可见光摄像头可包括红绿蓝 ( red green blue , RGB )摄像头。 热成像摄像头 可包括红外 ( infrared radiation , IR )摄像头。 其中, IR摄像头成像不受环境光线的干扰 / 无论白天还是夜晚、 晴天、 阴天还是雨天、 外部道路还是隧道等等不同应用场景,均可以 采集到质量差异不大的图像。 RGB摄像头价格低廉,应用普及,很多终端或者场景中都部 署有 RGB摄像头,并且 RGB图像也非常普及和通用。 因此,在车应用场景中车载摄像头 可为 IR摄像头。 从而利用 RGB摄像头进行人脸注册,提高注册的方便性和灵活性,利用 IR摄像头进行人脸识别,方便利用车载摄像头进行实时图像采集,基于人脸识别结果进行 解锁、 权限控制、 人员 /车辆管理等处理。 可理解,以上仅为_种示例,在具体实现中,可 能还包括其他类型的摄像头,这里不再一一列举。
一个示例中,第一摄像头可以为与电子设备连接的外接摄像头,又或者为该电子设备 内置的摄像头等等,本公开实施例对于该第一摄像头的具体实现形式不作限定。 相应的, 第二摄像头一个示例中,第一摄像头和第二摄像头还可为不同类型的车载摄像头,也就是 说,第一人脸图像可以为基于车载摄像头在车辆的驾驶区域得到的人脸图像。 可理解,在 具体实现中,如该第一摄像头和该第二摄像头内置于各种电子设备的情况下,作为示例, 如第 _摄像头可内置于相机中,又或者,内置于手机中,又或者,内置于车载设备中等等, 本公开实施例对于该第一摄像头和该第二摄像头的具体形式不作唯一性限定。
一个示例中,在第一摄像头为车载摄像头的情况下,通过第一摄像头获取第一人脸图 像,包括:
通过车载摄像头获取第一人脸图像,第一人脸图像包括车辆的用车人的人脸图像。 本实施例中,车辆可包括机动车、 非机动车、 汽车、 卡车、 班车、 出租车、 二轮车、 三轮车、 四轮及四轮以上车、 玩具车、 车型机器人、 遥控车等等,本公开实施例对于该车 辆的具体类型不作限定。
本实施例中,用车人可包括驾驶车辆的人、 乘坐车辆的人、 对车辆进行修理的人、 给 车辆加油的人以及控制车辆的人中的一项或多项。 其中,控制车辆的人可如控制遥控车的 人,给车辆加油的人可如加油工人,对车辆进行修改的人可如汽修工人,乘坐车辆的人可 如乘坐出租车或乘坐班车等等的人,驾驶车辆的人可为司机等等。 本公开实施例对于以上 用车人的具体类型不作限定。
一个示例中,在用车人包括驾驶车辆的人的情况下,本公开实施例还提供了一种电子 设备在何时获取第一人脸图像的触发条件,如通过车载摄像头获取第一人脸图像,包括: 在接收到触发指令的情况下,通过车载摄像头获取第一人脸图像;
或者,在车辆运行时,通过车载摄像头获取第一人脸图像
或者,在车辆的运行速度达到参考速度的情况下,通过车载摄像头获取第一人脸图像。 本实施例中,触发指令可以为电子设备接收到的用户输入的触发指令,也可以为与电 子设备连接的其他电子设备发送的触发指令等等,本实施例对于该触发指令的来源以及具 体形式不作限定。
本实施例中,车辆运行时,可理解为车辆打火时,也就是说,在电子设备检测到车辆 开始运行了,则该电子设备便可以获取车辆驾驶区域中的用户的人脸图像即第一人脸图像。
本实施例中,参考速度用于衡量车辆的运行速度达到多少时,电子设备获取第一人脸 图像,因此,对于该参考速度具体为多少不作限定。 该参考速度可以由用户设置,也可以 由与电子设备连接的测量车辆运行速度的器件设置,也可以由电子设备设置等等,本实施 例不作限定。
实施本实施例,通过设置触发条件来获取第一人脸图像,从而对用车人的身份进行识 别,可有效提高电子设备进行人脸识别的效率。
102、 提取第一人脸图像的第一人脸特征。
本公开实施例中,电子设备可通过任意的方法来提取第一人脸图像的第一人脸特征, 如该电子设备可通过特征点提取算法来提取第一人脸特征,其中,该特征点提取可采用但 不限于 susan算子特征提取、 harris算子特征提取、 sift特征提取或者经神经网络特征方法 等等。 又如该电子设备通过几何特征的人脸特征提取方法或基于模板匹配的人脸特征提取 方法来提取该第一人脸特征等等,本公开实施例对于该电子设备如何提取第一人脸特征不 作限定。
一个示例中,该电子设备可通过神经网络来提取第一人脸的第一人脸特征,其中,该 神经网络可为预先训练完成的神经网络。 如该预先训练完成的神经网络可以为本公开实施 例中的电子设备所训练完成的神经网络;也可以为通过其他设备训练完成的神经网络,而 后本公开实施例中的电子设备从该其他设备获取的神经网络等等,本公开实施例不作限定。
本公开实施例中,神经网络可由卷积层、 非线性层、 池化层等网络层按照一定方式堆 叠设计而成,本公开实施例对具体的网络结构并不限制。 设计好神经网络结构后,可基于 带有标注信息的图像,采用监督或弱监督方式对设计好的神经网络进行梯度反向传播等方 法进行成千甚至上万次的迭代训练,调整神经网络的网络参数,直至满足神经网络预定的 训练完成条件。 具体的训练方式本公开实施例并不限制。
其中,采用神经网络进行人脸图像的特征提取可以实现端到端的输出,例如,将第一 人脸图像输入至预先训练完成的神经网络,输出神经网络对该第一人脸图像进行特征提取 而得的特征图,也即端到端实现人脸图像特征提取的过程。 其中,人脸特征提取就是针对 人脸的某些特征进行人脸特征提取,人脸特征也可以称为人脸表征。 作为示例,通过神经 网络来提取人脸特征可具体为通过深度神经网络来提取人脸深层次的抽象的特征。
一个示例中,将第一人脸图像输入预先训练完成的神经网络,通过神经网络输出第一 人脸图像的第一人脸特征;其中,神经网络基于第一类型图像样本和第二类型图像样本训 练得到,第一类型图像样本和第二类型图像样本由不同类型的摄像头拍摄得到,且第一类 型图像样本和第二类型图像样本中包括人脸。 本公开通过采用基于两种不同类型的摄像头 拍摄得到的图像样本对神经网络训练,使得神经网络可以学习到不同类型的图像的特征提 取能力,由此基于训练后的神经网络实现对不同类型的图像的人脸识别能力。
103、 将第一人脸特征与预先存储的第二人脸特征进行对比,获得参考相似度,第二 人脸特征经第二摄像头获取的第二人脸图像的特征提取而得,第二摄像头与第一摄像头属 于不同类型的摄像头。
本公开实施例中,第一人脸图像可理解为需要进行人脸认证的人脸图像,或者可理解 为需要进行人脸识别的人脸图像,或者可理解为需要查询的人脸图像。 而第二人脸图像则 可理解为人脸注册时的人脸图像,或者也可理解为保存在身份底库中的人脸图像。 该身份 底库中保存有身份信息,以及与每个身份信息对应的人脸特征。 以下将以第一人脸图像为 需要进行人脸识别的人脸图像,以及第二人脸图像为人脸注册时的人脸图像为例来说明。
本公开实施例中,第一摄像头与第二摄像头属于不同类型的摄像头,也就是说,第一 人脸图像与第二人脸图像可理解为不同类型的人脸图像。 举例来说,第一人脸图像为 RGB 人脸图像,则第二人脸图像则可以为 IR人脸图像。又或者,第 _人脸图像为 IR人脸图像, 第二人脸图像为 RGB 人脸图像。 又或者,为其他类型的人脸图像等等,本公开实施例不 作限定。 其中,对于第一摄像头以及第二摄像头的具体描述可参考前述实施例,这里不再 -详述。
本公开实施例中,参考相似度即为第一人脸图像属于与身份底库中的第二人脸图像对 应的用户的相似程度,即参考相似度可用于表示第一人脸图像与第二人脸图像对应同一个 人的相似程度。 如电子设备可通过人脸特征之间的对比来得到参考相似度。
一个示例中,第二人脸图像为对用车人进行人脸注册的图像的情况下,本公开实施例 还提供了一种获取第二人脸图像的人脸特征的方法,如将第一人脸特征与预先存储的第二 人脸特征进行对比之前,图 1所示的方法还包括:
通过第二摄像头获取第二人脸图像;
提取第二人脸图像的第二人脸特征;
保存第二人脸图像的第二人脸特征。
本实施例对于提取第二人脸图像的人脸特征的方法不作限定,如可通过预先训练完成 的神经网络来提取该第二人脸图像的人脸特征,从而得到第二人脸特征。 又如还可通过局 部二值模式 ( local binary patterns , LBP )方法来提取该第二人脸图像的人脸特征。 又如还 可通过 sift特征提取方法,几何特征的人脸特征提取方法,基于模板匹配的人脸特征提取 方法等等来提取该第二人脸图像的人脸特征。 可理解,本实施例对于如何提取第二人脸图 像的人脸特征不作唯一性限定。 本实施例中,通过将第二人脸特征保存至电子设备中,可 为人脸识别提供保障。
104、 根据参考相似度确定第一人脸特征与第二人脸特征是否对应相同人。
本公开实施例中,根据参考相似度来确定第一人脸特征与第二人脸特征是否对应相同 人,如可通过比较参考相似度与相似度阈值 (可理解为静态的相似度阈值)之间的关系来 确定,如参考相似度不小于相似度阈值,则可确定第一人脸特征与第二人脸特征对应相同 人。而若参考相似度小于相似度阈值,则可确定第一人脸特征与第二人脸特征对应不同人。
一个示例中,本公开实施例还提供了一种采用动态相似度阈值来确定第一人脸特征与 第二人脸特征是否对应相同人的方法。 如根据参考相似度确定第一人脸特征与第二人脸特 征是否对应相同人,包括:
根据参考相似度、 参考误报率以及相似度阈值确定第一人脸特征与第二人脸特征是否 对应相同人;其中,不同的误报率对应不同的相似度阈值。
本实施例中,不同的误报率对应不同的相似度阈值,也就是说,误报率与相似度阈值 之间有对应关系。 其中,不同的误报率具体对应的相似度阈值为多少,本公开实施例不作 限定。 如该误报率与相似度阈值之间的对应关系可由用户设置,或者也可由电子设备自主 设置等等,本公开实施例不作限定。 可理解,本公开实施例中的参考误报率即为电子设备 所确定的一个误报率,如为电子设备从误报率与相似度阈值之间的对应关系中所确定出的 一个误报率。
举例来说,误报率与相似度阈值之间的关系如下:误报率为万分之一时,相似度阈值 为 0.7 ;误报率为十万分之一时,相似度阈值可为 0.8 ;误报率为百万分之一时,相似度阈 值可为 0.9 ;误报率为千万分之一时,相似度阈值为 0.98。 由此,在确定出参考误报率之 后,该电子设备便可可根据该参考误报率来确定相似度阈值,从而根据获得的参考相似度 与确定的相似度阈值来确定第一人脸特征与第二人脸特征是否对应相同人。 可理解,本公 开实施例对于电子设备如何确定参考误报率不作限定,如该电子设备可通过用户输入的确 定指令来确定,或者通过其他方法来确定等等。
实施本实施例,通过不同的误报率得到不同的相似度阈值,从而来确定第一人脸特征 与第二人脸特征是否对应相同人,避免了采用固定的相似度阈值的方式对人脸进行认证的 方案,从而可以动态的来确定用于衡量两个人脸图像之间关系的相似度,提高了人脸识别 的准确度。
一个示例中,本公开实施例还提供了一种确定第一人脸特征与第二人脸特征是否对应 相同人的方法,如根据参考相似度确定第一人脸特征与第二人脸特征是否对应相同人,包 括:
根据参考相似度以及阈值信息确定归一化后的参考相似度;
根据归一化后的参考相似度确定第一人脸特征与第二人脸特征是否对应相同人。
本实施例中,阈值信息根据正样本对的相似度和负样本对的相似度以及预设的不同误 报率得到;其中,正样本对和负样本对根据第一类型图像和第二类型图像得到,每个正样 本对包括两个图像,且两个图像中的人脸对应相同的人;每个负样本对包括两个图像,且 两个图像中的人脸对应不同的人,且正样本对和负样本对的相似度由预先训练完成的神经 网络确定。 一个示例中,该阈值信息中可包括第一阈值和第二阈值,由此电子设备可根据 参考相似度以及该第一阈值和该第二阈值确定归一化后的参考相似度,其中,该参考相似 度在第一阈值与第二阈值之间,且在阈值信息中,该参考相似度与第一阈值以及第二阈值 最接近。 其中,第一类型图像与第二类型图像分别由不同类型的摄像头得到。
本实施例中,可通过参考相似度从阈值信息中确定第一阈值和第二阈值,从而使得电 子设备能够根据该第一阈值和该第二阈值确定归一化后的参考相似度。 该归一化后的参考 相似度即为用于确定第一人脸特征与第二人脸特征是否对应相同人的最终相似度。 举例来 说 /参考相似度的数值在 T ( n-l ) (如为第一阈值)与 T ( n ) (如为第二阈值)之间,则 归一化后的参考相似度可确定为 0.3< n - 1 >10 + 0.1*(参考相似度- T(n-l))*(T(n) - T(n-l))。 可理解以上仅为一种归一化的方法示例,不应理解为对本实施例的限定。
可理解,本实施例中电子设备在确定归一化后的参考相似度后,该电子设备可利用固 定的相似度阈值来确定第一人脸特征与第二人脸特征是否对应相同人。 一个示例中,该电 子设备还可利用动态的相似度阈值 (即根据不同的误报率得到不同的相似度阈值)来确定 第一人脸特征与第二人脸特征是否对应相同人。
实施本实施例,可进一步提高用于确定第一人脸特征与第二人脸特征是否对应相同人 的相似度的精确度,提高了人脸认证的准确度。
一个示例中,由于身份底库中的人脸图像可能为多个,即预先存储的第二人脸特征可 能对应多个人,因此该第二人脸图像的数量可以至少包括两个,参考相似度的数量可以至 少包括两个。 因此,本公开实施例还提供了一种人脸识别方法,根据参考相似度、 参考误 报率以及相似度阈值确定第一人脸特征与第二人脸特征是否对应相同人,包括:
根据参考误报率确定相似度阈值,以及从至少两个参考相似度中确定与第一人脸特征 相似度最高的第二人脸特征;
在相似度最高的第二人脸特征与第一人脸特征的参考相似度大于相似度阈值的情况 下,确定相似度最高的第二人脸特征与第一人脸特征对应相同人。
本实施例中,电子设备可分别获取第一人脸特征与至少两个第二人脸特征的参考相似 度,从而从至少两个参考相似度中确定出与第一人脸特征相似度最高的第二人脸特征,然 后再对比该相似度最高的第二人脸特征与第一人脸特征的参考相似度是否大于相似度阈 值(根据不同的误报率得到),若大于,则说明该相似度最高的第二人脸特征与第一人脸 特征对应相同人。
进一步地,电子设备根据第一人脸特征与至少两个第二人脸特征的参考相似度得到的 归一化后的参考相似度的数量也至少包括两个。 因此在确定归一化后的参考相似度之后, 该电子设备还可根据归一化后的参考相似度确定与第一人脸特征相似度最高的第二人脸 特征,且在该与第一人脸特征相似度最高的第二人脸特征与第一人脸特征的归一化后的参 考相似度大于相似度阈值(可根据不同的误报率得到)的情况下,便可确定与第一人脸特 征相似度最高的第二人脸特征与第一人脸特征中的人脸属于同一个人脸,即对应相同人。
本公开实施例中,电子设备由于需要对比注册时的人脸图像与人脸识别时的人脸图像 是否对应相同人,因此,本公开实施例对于获取人脸注册时的人脸图像的电子设备以及获 取人脸识别时的人脸图像的电子设备是否为同一类型(或同一个)的电子设备不作限定。
本公开申请人在实现本公开实施例过程中发现,传统的人脸识别方法往往限制认证的 图像类型和注册的图像类型为相同的图像类型,如注册过程采用 RGB 图像,则认证过程 也需采用 RGB 图像,由此限制了传统人脸识别方案在涉及多类摄像头场景中的应用。 本 公开实施例为涉及多类摄像头的场景提供了人脸识别解决方案,实施本公开实施例中,通 过将一类类型摄像头获取第二人脸图像的人脸图像作为底库特征,通过另一类型摄像头获 取的第一人脸图像的人脸特征与底库特征进行比对,根据比对结果实现人脸识别,使得本 公开实施例所提供的人脸识别方法应用于更多的场景,不仅方便人脸认证,而且对于人脸 注册时的摄像头也不作限定,提高了人脸注册的便利性。
作为示例,以下将以举例的方式来说明本公开实施例所应用的场景:
场景一、
(1)注册过程:用户可通过手机完成人脸注册,即由手机上设置的摄像头拍摄的人 脸图像进行注册流程,由于手机通常设置的是可见光摄像头(如 RGB摄像头),因此注册 的人脸图像就是 RGB 摄像头拍摄的第二人脸图像。 然后将注册的人脸图像通过手机或经 手机通过服务器发送给车载设备,车载设备存储该注册的人脸图像,即车载设备存储第二 人脸图像。 或者,用户可通过手机上设置的可见光摄像头拍摄得到第二人脸图像,然后将 该第二人脸图像发送给服务器或车载设备,从而在服务器或车载设备上完成对第二人脸图 像的注册,注册完成后保存基于第二人脸图像提取的第二人脸特征。
(2)识别过程:用户通过车载设备采集需要识别的人脸图像(即第一人脸图像),车 载设备上可设置有红外摄像头,由此经红外摄像头拍摄的如 IR人脸图像可作为待进行人 脸识别的图像,即第 _人脸图像。 该车载设备提取 IR图像的人脸特征,然后将 IR图像的 人脸特征和已注册的 RGB 图像的人脸特征进行比对,从而来确定待识别的用户和已注册 的用户是否是同一人。
可理解,本公开实施例所示出的场景一可应用于驾驶员状态监控系统、乘车管理系统、 租车管理系统以及网约车管理系统等等。 如对于驾驶员状态监控系统来说,该系统常常包 括人脸识别、 驾驶员动作检测、 驾驶员疲劳检测以及驾驶员注意力监控等几个模块。 因此 上述系统在人脸识别阶段可通过场景一所示的方法来进行人脸识别,从而确定驾驶员的身 份或者租赁车辆的人的身份等等。
场景二、
本公开实施例所提供的人脸识别方法还可应用于小区门禁管理系统以及安防布控系 统等等,如以小区门禁管理系统为例:
(1)注册过程:用户(某小区内的住户)可通过手机进行人脸注册,即由手机上设 置的可见光摄像头(如 RGB 摄像头)获取该用户的人脸图像即第二人脸图像。 然后将注 册的人脸图像通过手机或经手机通过服务器发送给门禁控制设备,门禁控制设备存储该第 二人脸图像。 或者,用户可通过手机上设置的可见光摄像头拍摄得到第二人脸图像,然后 将该第二人脸图像发送给门禁控制设备,从而由该门禁控制设备完成对第二人脸图像的注 册,注册完成后保存基于该第二人脸图像提取的第二人脸特征。
(2)识别过程:用户需要进入小区时,门禁控制设备可通过红外摄像头(如 IR摄像 头)来获取该用户的人脸图像即第一人脸图像。 然后该门禁控制设备提取第一人脸图像的 人脸特征得到第_人脸特征,该门禁控制将通过 IR摄像头拍摄的第_人脸图像也即 IR图 像的人脸特征与已注册的通过 RGB摄像头拍摄的 RGB图像的人脸特征进行对比,从而来 确定待进入小区的用户与已注册的用户是否为同 _人。
可理解,以上仅为本公开实施例示出的一些场景,在具体实现中,本公开实施例所提 供的方法还可应用于更多的场景中,如本公开实施例所提供的方法还可应用于终端解锁如 手机解锁以及银行身份认证系统中等等,本公开实施例不作限定。 如对于手机解锁应用来 说,用户可通过手机进行人脸注册,然后在每一次使用手机的过程中,该手机均可执行本 公开实施例所提供的方法从而实现对人脸图像的识别。 可理解,人脸注册时的手机与人脸 识别时的手机可为不同的手机,即人脸注册时的手机中的摄像头与人脸识别时的手机中的 摄像头类型可不同。 又如对金融身份认证系统即银行身份认证系统来说,用户在开银行账 号时,可通过银行终端来进行人脸注册,然后在后续办理银行业务的过程中,其他银行终 端可执行本公开实施例所提供的方法从而实现对人脸图像的识别,以确保用户银行业务的 安全性。 其中,人脸注册时的银行终端与人脸识别时的银行终端中的摄像头类型可不同。
因此,不应将本公开实施例所示出的场景理解为对本公开实施例的限定。
本公开申请人在实践本公开实施例过程中进一步发现,同一个人通过 RGB 摄像头和 IR摄像头拍摄两张人脸图像,然后用这两张图像形成 RGB图像、 IR图像和 RGB与红外 图像的混合图像这 3组混合比较组合,经过同一个神经网络得到的相似度可能存在差异。
同时,两个不同的人分别通过 RGB摄像头和 IR摄像头拍摄四张人脸图像,然后用这 四张人脸图像组成不同的图像组合,如用户 1RGB图像与用户 2RGB图像,用户 1IR图像 与用户 2IR图像,用户 1RGB图像与用户 2IR图像,用户 1IR图像与用户 2RGB图像。 这 4组混合比较组合,经过同一个神经网络得到的相似度也可能存在差异。
由此,本公开实施例提供了一种训练神经网络( neural network , NN)的技术方案,可 有效减小甚至避免上述所出现的问题。 可理解,本公开实施例中的神经网络可包括深度神 经网络( deep neural network , DNN \ 卷积神经网络等等,本公开实施例对于该神经网络 的具体形式不作限定。
以下将详细介绍本公开实施例提供的训练神经网络的技术方案。 参见图 2 ,图 2是本公开实施例提供的一种神经网络训练方法的流程示意图,该神经 网络训练方法可应用于神经网络训练装置,以及该神经网络训练方法还可应用于电子设备, 该电子设备可包括服务器或终端设备,该终端设备可包括手机、 平板电脑、 台式电脑、 个 人掌上电脑、 车载设备、 车载机器人等等,本公开实施例对于该电子设备的具体形式不作 唯一性限定。 可理解,该神经网络的训练方法还可应用于人脸识别装置中。 也就是说,图 2所示的方法与图 1所示的方法可以由同一类型的电子设备执行,也可以由不同类型的电 子设备执行等等,本公开实施例不作限定。 其中,同一类型的电子设备执行,也就是说, 图 1所示的方法由终端设备执行,图 2所示的方法也可由终端设备执行。 又或者,图 2所 示的方法可以与图 1所示的方法由同一个设备执行等等,本公开实施例不作限定。
以下将神经网络训练过程中使用到的训练图像称为图像样本,图像样本包括有标注信 息,标注信息可包括但不限于以下至少之一:图像中的人脸 ID(也可理解为人脸标注信息), 图像的类型等,其中,对应相同人的人脸 ID相同,图像的类型用于表征图像采集对应的 摄像头类型。 如图 2所示,该神经网络训练方法包括:
201、 获取第一类型图像样本和第二类型图像样本,第一类型图像样本和第二类型图 像样本由不同类型的摄像头拍摄得到,且第一类型图像样本和第二类型图像样本中包括人 脸。
本公开实施例中,第一类型图像样本中至少包括人脸的图像,第二类型图像样本中至 少包括人脸的图像,且该第一类型图像样本与该第二类型图像样本由不同类型的摄像头得 到。 如第一类型图像样本由 RGB 摄像头得到,则第二类型图像样本则可由其他类型摄像 头如 IR摄像头得到。 可理解,对于不同类型的摄像头的具体实施方式可参考图 1所示的 方式,这里不再 __赘述。
可理解,该第一类型图像样本的数量,以及该第二类型图像样本的数量本公开实施例 不作限定。 如该第一类型图像样本的数量以及该第二类型图像样本的数量可以以神经网络 的训练程度为衡量标准等等。
202、 根据第一类型图像样本和第二类型图像样本训练神经网络。
本公开实施例中,电子设备可通过两种不同类型的摄像头拍摄得到的图像样本来训练 神经网络,使得神经网络在训练过程中可以学习到对两类不同图像的特征提取能力。 当神 经网络训练完成之后,基于训练完成的神经网络可对这两类不同图像中的任一类图像进行 特征提取,并且保证特征提取的精度,由此满足基于这两类摄像头进行人脸注册和识别的 应用需求。 也就是说,在训练神经网络时,不单纯使用一个类型图像样本进行训练,而是 使用多个类型图像样本进行训练,从而可使得训练出的神经网络能够有效得到不同类型图 像样本的特征。
一个示例中,以监督训练为例,神经网络的训练方法可包括:如将第一类型图像样本 和第二类型图像样本输入神经网络,经神经网络对第一类型图像样本和第二类型图像样本 进行处理后分别输出神经网络对第一类型图像样本的预测结果和第二类型图像样本的预 测结果(即每个图像样本的人脸预测结果)> 然后通过预定的损失函数计算图像样本的人 脸预测结果和图像样本的标注信息(即真实的人脸标注信息)之间的损失;即通过预定的 损失函数计算第一类型图像样本的预测结果与标注信息之间的损失,以及第二类型图像样 本的预测结果与标注信息之间的损失。 从而将该损失反向回传到神经网络,神经网络根据 反向回传的损失调整如卷积核、 权重等网络参数的参数值。 一般来说,在进行调整后,可 再输入其他的第一类型图像样本和其他的第二类型图像样本,重复上述训练过程,如此反 复,直至满足预定的训练完成条件(如损失小于预定阈值,或迭代训练次数超过设置次数 等等)> 可理解,以上仅为本公开实施例提供的一种训练过程,在具体实现中,可能还包 括其他方法等,本公开实施例不作限定。
一个示例中,根据第一类型图像样本和第二类型图像样本训练神经网络包括: 将第一类型图像样本和第二类型图像样本配对,得到第一类型图像样本和第二类型图 像样本的混合类型图像样本;
根据第一类型图像样本、 第二类型图像样本和混合类型图像样本,训练神经网络。 本实施例中,第一类型图像样本和第二类型图像样本配对,也就是说,混合类型图像 样本中每对混合类型图像样本包括第一类型图像样本和第二类型图像样本,由此形成两种 不同类型的训练用图像样本。 其中,通过第一类型图像样本、 第二类型图像样本以及混合 类型图像样本来训练神经网络,使得该神经网络不单可以学习到各单一类型的图像的特征 提取能力,还可以更好地共同学习到这两类不同类型的图像的特征提取能力,提高神经网 络特征提取的准确度,使得训练完成的神经网络能够有效地应用于本公开实施例所提供的 人脸识别方法。
一个示例中,根据第一类型图像样本、 第二类型图像样本和混合类型图像样本,训练 神经网络,包括:
通过神经网络获取第一类型图像样本的人脸预测结果、 第二类型图像样本的人脸预测 结果和混合类型图像样本的人脸预测结果;
根据第一类型图像样本的人脸预测结果和人脸标注结果的差异、 第二类型图像样本的 人脸预测结果和人脸标注结果之间的差异、 以及混合类型图像样本的人脸预测结果和人脸 标注结果的差异,训练神经网络。
本实施例中,电子设备可通过神经网络分别获取第一类型图像样本的人脸预测结果、 第二类型图像样本的人脸预测结果以及混合类型图像样本的人脸预测结果。 然后基于该第 一类型图像样本的人脸预测结果和人脸标注结果的差异、 第二类型图像样本的人脸预测结 果和人脸标注结果之间的差异、 以及混合类型图像样本的人脸预测结果和人脸标注结果的 差异,训练神经网络。 如可基于第一类型图像样本的人脸预测结果与人脸标注结果之间的 损失来训练神经网络,以及基于第二类型图像样本的人脸预测结果与人脸标注结果之间的 损失来训练神经网络,以及基于混合类型图像样本的人脸预测结果与人脸标注结果之间的 损失来训练神经网络。 可理解,对于具体的训练方法可参考前述实施例的描述,这里不再 -详述。
一个示例中,为进一步提高神经网络提取人脸特征的准确度,本公开实施例还提供了 一种训练方法,如神经网络中包括第一分类器、 第二分类器和混合分类器,通过神经网络 获取第一类型图像样本、 第二类型图像样本和混合类型图像样本的人脸预测结果,包括: 将第一类型图像样本的特征输入至第一分类器中,得到第一类型图像样本的人脸预测 结果; 将第二类型图像样本输入至第二分类器中,得到第二类型图像样本的人脸预测结果; 将混合类型图像样本的特征输入至混合分类器中,得到混合类型图像样本的人脸预测 结果。
本实施例中,分类器可用于对不同类型图像样本的人脸预测结果进行分类,如通过分 类器可得到输入该分类器的图像样本的人脸预测结果,从而可根据分类器的输出确定损失 进而反向回传至神经网络,训练该神经网络。 一个示例中,可分别通过第一分类器来输出 第一类型图像样本的人脸预测结果,第二分类器来输出第二类型图像样本的人脸预测结果 以及混合分类器来输出混合类型图像样本的人脸预测结果。 通过与图像样本的类型相对应 的分类器来输出人脸预测结果,可有效提高分类器输出人脸预测结果的准确度,进而基于 分类器的输出结果提高支持混合类型图像特征提取的神经网络训练的精准度,提高神经网 络对不同类型图像人脸特征提取的准确性和鲁棒性。
其中,根据第一类型图像样本、 第二类型图像样本和混合类型图像样本,训练神经网 络的具体实现方式可如图 3所示周 3是本公开实施例提供的一种训练过程示意图。其中, 以第一类型图像样本为 RGB图像样本 ,RGB图像样本库包括的各图像样本均为 RGB图像 样本;第二类型图像样本为 IR图像样本, IR图像样本库包括的各图像样本均为 IR图像样 本;混合类型图像样本为 RGB&IR图像样本为例,混合类型图像样本库中包括部分 RGB 图像样本和部分 IR图像样本,表示为 RGB&IR图像样本。 同时,以第一分类器为 RGB分 类器、 第二分类器为 IR分类器以及混合分类器为 RGB&IR分类器为例,其中: RGB分类 器用于对 RGB图像样本库中的 RGB图像样本进行分类,某 RGB图像样本的分类结果表 示该 RGB图像样本中的人脸属于 RGB图像样本库中各人脸 ID类别的概率; IR分类器用 于对 IR图像样本库中的 IR图像样本进行分类,某 IR图像样本的分类结果表示该 IR图像 样本中的人脸属于 IR图像样本库中各人脸 ID类别的概率; RGB&IR分类器用于对混合类 型图像样本库中的 RGB图像样本和 IR图像样本进行分类,某 RGB&IR图像样本表示该图 像样本中的人脸属于混合类型图像样本库中各人脸 ID类别的概率。 其中, RGB&IR图像 样本中 " &〃 可表示输入至混合分类器即 RGB&IR分类器的图像样本可能为 RGB类型的 图像样本,也可能为 IR类型的图像样本。 因此,不应将本公开中的 " &〃 理解为对本公开 具有限定意义。
如图 3所示, RGB图像样本、 IR图像样本和 RGB&IR图像样本分别输入至神经网络 之后,该神经网络便可通过特征提取器输出 RGB图像样本的特征、 IR图像样本的特征以 及 RGB&IR 图像样本的特征。 而后将 RGB 图像样本的特征、 IR 图像样本的特征以及 RGB&IR图像样本的特征分别输入至 RGB分类器、 IR分类器和 RGB&IR分类器。 由此 / 由该神经网络通过分类器输出各个图像样本的人脸预测结果,该各个图像样本的人脸预测 结果与各个图像样本的人脸标注结果进行比较,即得到各个图像样本的人脸预测结果与各 个图像样本的人脸标注结果的损失,再将该损失反向传播至整个神经网络,训练整个神经 网络。本实施例中,通过在神经网络中加入分类器,通过分类器来辅助训练整个神经网络, 可使得训练完成的神经网络能够准确且有效地提取出不同类型图像的特征,从而提高人脸 识别的准确度以及效率。
可理解,在通过第一分类器、 第二分类器和混合分类器完成对整个神经网络的训练之 后,图 2所示的方法还包括:
在训练完成的所述神经网络中去除第一分类器、 第二分类器和混合分类器,得到用于 进行人脸识别的神经网络。
也就是说,第一分类器、 第二分类器和混合分类器可以用来辅助训练神经网络,但是 在具体应用中,如应用本公开实施例所提供的方法通过神经网络对人脸识别的过程中,该 神经网络中可以不包括该第一分类器、 第二分类器以及混合分类器,由此,在神经网络训 练装置训练完成之后,可以将神经网络中的第一分类器、 第二分类器和混合分类器去除。
本公开实施例中,通过采用不同类型摄像头拍摄得到的图像来训练神经网络,可有效 提高该神经网络输出特征的效率,减少甚至避免了不同类型图像经过同一神经网络来提取 特征导致的相似度差异。
一个示例中,为了得到图 1所示的用于确定归一化后的参考相似度的阈值信息,本公 开实施例还提供了一种阈值信息获取方法,如下所示:
根据第一类型图像样本、第二类型图像样本和混合类型图像样本,训练神经网络之后, 图 2所示的方法还包括:
获取第一类型图像和第二类型图像,第一类型图像与第二类型图像由不同的摄像头获 得;
根据第一类型图像和第二类型图像,获取正样本对和负样本对,每个正样本对包括两 个图像,且每个正样本对中两个图像中的人脸对应相同的人;每个负样本对包括两个图像, 且每个负样本对中两个图像中的人脸对应不同的人;
经训练完成后的神经网络分别确定正样本对的相似度和负样本对的相似度; 根据正样本对的相似度和负样本对的相似度以及预设不同的误报率,确定阈值信息, 阈值信息中包括第一阈值和第二阈值。
本实施例中,第一类型图像中至少包括人脸的图像,第二类型图像中至少包括人脸的 图像,且该第一类型图像和该第二类型图像由不同类型的摄像头得到。 如可通过 RGB 摄 像头获取若干人的 RGB图像,以及通过 IR摄像头获取若干人的 IR图像,如包括 N个人, 每个人包括 M张 RGB图像以及 M张 IR图像。 该 M和 N均为大于或等于 2的整数。
一个示例中,根据第一类型图像和第二类型图像,获取正样本对,包括:
将第一类型图像进行配对,得到第一类型图像的正样本对;
以及将第二类型图像进行配对,得到第二类型图像的正样本对;
以及将第一类型图像和第二类型图像配对,得到混合图像的正样本对。
本实施例中,如以包括 N个人,每个人包括 M张 RGB图像以及 M张 IR图像为例, 则将每个人包括的 M张 RGB图像进行配对,得到 M* ( M-1 ) /2个 RGB正样本对;将每 个人包括的 M张 IR图像进行配对 /得到 M* ( M-1 ) /2个 IR正样本对;将每个人包括的 M张 RGB图像和 M张 IR图像进行配对,得到 M*M个 RGB&IR正样本对。
对于负样本对则可以将每个人的图像与其他不同人的图像配对,构成负样本对。 如以 第一用户和第二用户为例则该负样本对可包括第一用户的 IR图像、第二用户的 IR图像; 第一用户的 RGB图像、第二用户的 RGB图像;以及第一用户的 IR图像、第二用户的 RGB 图像。 得到正负样本和负样本对之后,便可在图 2所示的训练的神经网络上测试,如通过训 练完成的神经网络输出正样本对的人脸特征以及负样本对的人脸特征,根据该正样本对的 人脸特征获得该正样本对的相似度,以及根据该负样本对的人脸特征获得该负样本对的相 似度。 从而来获得不同误报率下的通过率和对应的阈值。 具体的,如在已获得正样本对的 相似度以及负样本对的相似度的情况下,根据目标误报率,从各个样本对的相似度中找出 相似度最低的样本对,且该相似度最低的样本对属于误报的样本对;从而可将该相似度最 低的样本对所对应的相似度作为该目标误报率对应的阈值。 可理解, 目标误报率可理解为 预先设置或选取的一个误报率,本公开实施例对于该目标误报率的具体取值不作限定。
如表 1所示,表 1是本公开实施例提供的一种阈值信息。
表 1
Figure imgf000016_0001
其中,误报率可由电子设备自主设置等等,本公开实施例对于该误报率的具体取值不 作限定。
举例来说, 目标误报率为 0.00001 ,正样本对和负样本对 _共有 1000000对,则可知 误报的样本对共有 10对。 则可以从正样本对和负样本对中找出该 10对误报的样本对,然 后从中选取出相似度最低的样本对,由此该相似度最低的样本对的相似度即为目标误报率 所对应的阈值。 如对于表 1来说,与目标误报率 0.00001对应的阈值为 T( 5 x 可理解, 本公开实施例对于如何选取出相似度最低的样本对的方法不作限定,如可通过排序法来获 取该相似度最低的样本对等等。 以及表 1所示的各个对应关系仅为一种示例,对于具体的 取值本公开实施例不作限定。
本实施例中,在训练完成神经网络之后,再根据大量的图像来对该神经网络进行测试, 从而得到不同误报率下的阈值,即可得到阈值信息,进而使得在应用该神经网络时,可以 根据不同的误报率来采用不同的阈值信息(如第一阈值和第二阈值)来确定归一化后的参 考相似度。 可理解,对于表 1的具体应用可参考图 1所示的实现方式,如电子设备可根据 表 1中的阈值信息以及电子设备得到的第一人脸特征与第二人脸特征的参考相似度,确定 归一化后的参考相似度,从而根据归一化后的参考相似度确定该第一人脸特征与该第二人 脸特征是否对应相同人。
可理解,以上各个实施例各有侧重,一个实施例中未详尽描述的实现方式,可对应参 考其他实施例的实现方式,这里不再一一详述。
上述详细阐述了本公开实施例的方法,下面提供了本公开实施例的装置及电子设备, 鉴于简洁描述的考虑,装置中在技术原理、 技术效果等方面下文未详述的部分,可参见上 文中方法实施例的相应记载,不再赘述。
参见图 4 ,图 4是本公开实施例提供的一种人脸识别装置的结构示意图,该人脸识别 装置可用于执行图 1所示的人脸识别方法。 如图 4所示,该人脸识别装置包括:
第_获取单元 401 ,用于通过第 _摄像头获取第 _人脸图像; 第一提取单元 402 ,用于提取第一人脸图像的第一人脸特征;
对比单元 403 ,用于将第一人脸特征与第二人脸特征进行对比,获得参考相似度,第 二人脸特征经第二摄像头获取的第二人脸图像的特征提取而得,第二摄像头与第一摄像头 属于不同类型的摄像头;
确定单元 404 ,用于根据参考相似度确定第一人脸特征与第二人脸特征是否对应相同 人。
本公开申请人在实现本公开实施例过程中发现,传统的人脸识别方法往往限制认证的 图像类型和注册的图像类型为相同的图像类型,如注册过程采用 RGB 图像,则认证过程 也需采用 RGB 图像,由此限制了传统人脸识别方案在涉及多类摄像头场景中的应用。 本 公开实施例为涉及多类摄像头的场景提供了人脸识别解决方案,实施本公开实施例中,通 过将一类类型摄像头获取第二人脸图像的人脸图像作为底库特征,通过另一类型摄像头获 取的第一人脸图像的人脸特征与底库特征进行比对,根据比对结果实现人脸识别,使得本 公开实施例所提供的人脸识别方法应用于更多的场景,不仅方便人脸认证,而且对于人脸 注册时的摄像头也不作限定,提高了人脸注册的便利性。
一个示例中,第一摄像头为热成像摄像头,第二摄像头为可见光摄像头;或者,第一 摄像头为可见光摄像头,第一摄像头为热成像摄像头。
一个示例中,确定单元 404 ,具体用于根据参考相似度、 参考误报率以及相似度阈值 确定第一人脸特征与第二人脸特征是否对应相同人;其中,不同的误报率对应不同的相似 度阈值。
实施本公开实施例,通过不同的误报率得到不同的相似度阈值,从而来确定第一人脸 特征与第二人脸特征是否对应相同人,避免了采用固定的相似度阈值的方式对人脸进行认 证的方案,从而可以动态的来确定用于衡量两个人脸图像之间关系的相似度,提高了人脸 认证或人脸识别的效率以及准确度。
一个示例中,确定单元 404 ,具体用于根据参考相似度以及阈值信息确定归一化后的 参考相似度;以及根据归一化后的参考相似度确定第一人脸特征与第二人脸特征是否对应 相同人。
本公开实施例中,通过参考相似度以及预置信息来确定归一化后的参考相似度,从而 根据该归一化后的参考相似度来确定第一人脸特征与第二人脸特征是否对应相同人。 有效 改进了采用固定阈值的方式来对人脸进行识别的方案,从而可以动态的来确定用于衡量两 个人脸图像之间关系的相似度(即归一化后的参考相似度),提高了人脸识别的效率以及 准确度。
一个示例中,第一提取单元 402 ,具体用于将第一人脸图像输入预先训练完成的神经 网络,通过神经网络输出第一人脸图像的第一人脸特征;其中,神经网络基于第一类型图 像样本和第二类型图像样本训练得到,第一类型图像样本和第二类型图像样本由不同类型 的摄像头拍摄得到,且第一类型图像样本和第二类型图像样本中包括人脸。
本公开实施例中,通过不同类型的图像样本训练神经网络,从而再应用该神经网络如 对人脸进行识别等等,提高了人脸识别的效率以及准确度。
一个示例中,神经网络基于第一类型图像样本、 第二类型图像样本和混合类型图像样 本训练得到,混合类型图像样本由第一类型图像样本和第二类型图像样本配对而得。
一个示例中,第一摄像头包括车载摄像头,第一获取单元 401 ,具体用于通过车载摄 像头获取第一人脸图像,第一人脸图像包括车辆的用车人的人脸图像。
本公开实施例可有效应用于驾驶员监控系统,从而提高对驾驶员的人脸识别效率。 一个示例中,用车人包括驾驶车辆的人、 乘坐车辆的人、 对车辆进行修理的人、 给车 辆加油的人以及控制车辆的人中的一项或多项。
一个示例中,在所述用车人包括驾驶车辆的人的情况下,第一获取单元 401 ,具体用 于在接收到触发指令的情况下,通过车载摄像头获取第一人脸图像;
或者,第一获取单元 401 ,具体用于在车辆运行时,通过车载摄像头获取第一人脸图 像;
或者,第一获取单元 401 ,具体用于在车辆的运行速度达到参考速度的情况下,通过 车载摄像头获取第一人脸图像。
一个示例中,第二人脸图像为对用车人进行人脸注册的图像,如图 5所示,人脸识别 装置还包括:
第二获取单元 405 ,用于通过第二摄像头获取第二人脸图像;
第二提取单元 406 ,用于提取第二人脸图像的第二人脸特征;
保存单元 407 ,用于保存第二人脸图像的第二人脸特征。
需要说明的是,各个单元的实现还可以对应参照图 1所示的方法实施例的相应描述。 参见图 6 ,图 6是本公开实施例提供的一种神经网络训练装置的结构示意图,该神经 网络训练装置可用于执行图 2所示的人脸识别方法。 如图 6所示,该神经网络训练装置包 括:
获取单元 601 ,用于获取第一类型图像样本和第二类型图像样本,第一类型图像样本 和第二类型图像样本由不同类型的摄像头拍摄得到,且第一类型图像样本和第二类型图像 样本中包括人脸;
训练单元 602 ,用于根据第一类型图像样本和第二类型图像样本训练神经网络。
本公开实施例中,通过采用不同类型摄像头拍摄得到的人脸图像来训练神经网络,可 有效提高该神经网络输出人脸特征的准确度;同时在进行人脸识别,应用该神经网络提取 人脸特征时,还有效提高了人脸识别的准确度。
—个示例中,如图 7所示,训练单元 602包括:
配对子单元 6021,用于将第一类型图像样本和第二类型图像样本配对,得到第一类型 图像样本和第二类型图像样本的混合类型图像样本;
训练子单元 6022 ,用于根据第一类型图像样本、 第二类型图像样本和混合类型图像样 本,训练神经网络。
本实施例中,第一类型图像样本和第二类型图像样本配对,也就是说,混合类型图像 样本中每对混合类型图像样本包括第一类型图像样本和第二类型图像样本,由此形成两种 不同类型的训练用图像样本。 其中,通过第一类型图像样本、 第二类型图像样本以及混合 类型图像样本来训练神经网络,使得该神经网络不单可以学习到各单一类型的图像的特征 提取能力,还可以更好地共同学习到这两类不同类型的图像的特征提取能力,提高神经网 络特征提取的准确度,使得训练完成的神经网络能够有效地应用于本公开实施例所提供的 人脸识别方法。
一个示例中,训练子单元 6022 ,具体用于通过神经网络获取第一类型图像样本的人脸 预测结果、 第二类型图像样本的人脸预测结果和混合类型图像样本的人脸预测结果;以及 根据第一类型图像样本的人脸预测结果和人脸标注结果的差异、 第二类型图像样本的人脸 预测结果和人脸标注结果之间的差异、 以及混合类型图像样本的人脸预测结果和人脸标注 结果的差异,训练神经网络。
一个示例中,神经网络中包括第一分类器、第二分类器和混合分类器,训练子单元 6022 , 具体用于将第一类型图像样本的特征输入至第一分类器中,得到第一类型图像样本的人脸 预测结果;以及将第二类型图像样本输入至第二分类器中,得到第二类型图像样本的人脸 预测结果;以及将混合类型图像样本的特征输入至混合分类器中,得到混合类型图像样本 的人脸预测结果。
一个示例中,如图 8所示,上述装置还包括:
神经网络应用单元,用于在训练完成的神经网络中去除第一分类器、 第二分类器和混 合分类器,得到用于进行人脸识别的神经网络。
需要说明的是,各个单元的实现还可以对应参照图 2所示的方法实施例的相应描述。 请参见图 9 ,图 9是本公开实施例提供的一种电子设备的结构示意图。 如图 9所示, 该电子设备包括处理器 901、 存储器 902和输入输出接口 903 ,所述处理器 901、 存储器 902和输入输出接口 903通过连接线相互连接,该连接线可包括总线等等。
输入输出接口 903 ,可用于输入数据和 /或信号,以及输出数据和 /或信号。
存储器 902包括但不限于是随机存储记忆体 ( random access memory , RAM \ 只读存 储器 ( read-only memory ,ROM X可擦除可编程只读存储器 ( erasable programmable read only memory , EPROM \ 或便携式只读存储器 ( compact disc read-only memory , CD-ROM ) , 该存储器 902用于相关指令及数据。
处理器 901可以是一个或多个,所述一个或者多个处理器可以为:一个或者多个中央 处理器 ( central processing unit , CPU ) , ,和 /或 /—个或多个加速单元等。 CPU可以是单核 CPU,也可以是多核 CPU。加速单元可包括但不限于图像处理器 ( graphics processing unit , GPU \ 可编程逻辑单元 ( field - programmable gate array , FPGA )等。
可理解,本公开实施例所提供的处理器还可以是其他类型的处理器,本公开实施例对 于该处理器的类型不作唯一性限定。 以及本公开实施例提供的存储器还可以是其他类型的 存储器等等,本公开实施例对于该存储器的类型也不作限定。
一个示例中,各个操作的实现还可以对应参照图 1所示的方法实施例的相应描述。 以 及各个操作的实现还可对应参考图 2所示的方法实施例的相应描述。 或者,各个操作的实 现还可对应参考图 4和图 5所示的实施例的相应描述。 以及各个操作的实现还可对应参考 图 6至图 8所示的实施例的相应描述。
如在一个实施例中,处理器 901可用于执行步骤 101至步骤 104所示的方法。 作为一 种示例,处理器还可用于控制输入输出接口来获取第一人脸图像等等,本公开实施例对于 如何获取第一人脸图像不作唯一性限定。 又如在一个实施例中,处理器还可用于在执行步骤 201和步骤 202所示的方法。
又如处理器 901还可用于执行第一获取单元 401、 第一提取单元 402、 对比单元 403、 确定单元 404所执行的方法等等。
又如处理器 901还可用于执行获取单元 601和训练单元 602所执行的方法等等。
由此 T于图 9所示的电子设备的具体实现方式,可对应参考前述各个实施例的描述, 这里不再 __详述。
本公开实施例还提供了一种计算机可读存储介质。 上述方法实施例中的全部或者部分 流程可以由计算机程序来指令相关的硬件完成,该程序可存储于上述计算机存储介质中, 该程序在执行时,可包括如上述各方法实施例的流程。 计算机可读存储介质可以是前述任 一实施例的人脸识别装置或神经网络训练装置的内部存储单元,例如人脸识别装置或神经 网络训练装置的硬盘或内存。 上述计算机可读存储介质也可以是上述人脸识别装置或神经 网络训练装置的外部存储设备,例如上述人脸识别装置或神经网络训练装置上配备的插接 式硬盘,智能存储卡 ( smart media card, SMC ) ,安全数字 ( secure digital, SD )卡 /闪存卡 ( flash card )等。 进一步地,上述计算机可读存储介质还可以既包括上述人脸识别装置或 神经网络训练装置的内部存储单元也包括外部存储设备。 上述计算机可读存储介质用于存 储上述计算机程序以及上述人脸识别装置或神经网络训练装置所需的其他程序和数据。 上 述计算机可读存储介质还可以用于暂时地存储已经输出或者将要输出的数据。
在一个或多个可选实施方式中,本公开实施例还提供了一种计算机程序程序产品,用 于存储计算机可读指令,所述指令被执行时使得计算机执行上述任意实施例中任一所述的 方法。
该计算机程序产品可以具体通过硬件、软件或其结合的方式实现。在一个可选例子中, 所述计算机程序产品具体体现为计算机存储介质,在另一个可选例子中,所述计算机程序 产品具体体现为软件产品 /例如软件开发包 ( softwaredevelopmentkiU SDK )等等。
在上述实施例中,可以全部或部分地通过软件、 硬件、 固件或者其任意组合来实现。 当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。 所述计算机程序产 品包括一个或多个计算机指令。 在计算机上加载和执行所述计算机程序指令时,全部或部 分地产生按照本公开实施例所述的流程或功能。 所述计算机可以是通用计算机、 专用计算 机、 计算机网络、 或者其他可编程装置。 所述计算机指令可以存储在计算机可读存储介质 中,或者通过所述计算机可读存储介质进行传输。 所述计算机可读存储介质可以是计算机 能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、 数据中心等数据 存储设备。 所述可用介质可以是磁性介质,(例如,软盘、 硬盘、 磁带 > 光介质 (例如, DVD), 或者半导体介质 (例如 /固态硬盘 ( solid state disk , SSD ))等。
本公开实施例方法中的步骤可以根据实际需要进行顺序调整、 合并和删减。
本公开实施例装置中的模块可以根据实际需要进行合并、 划分和删减。
以上所述,以上实施例仅用以说明本公开的技术方案,而非对其限制;尽管参照前述 实施例对本公开进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述 各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修 改或者替换,并不使相应技术方案的本质脱离本公开各实施例技术方案的范围。

Claims

权利要求
1、 一种人脸识别方法,其特征在于,包括:
通过第一摄像头获取第一人脸图像;
提取所述第一人脸图像的第一人脸特征;
将所述第一人脸特征与预先存储的第二人脸特征进行对比,获得参考相似度,所述第 二人脸特征经第二摄像头获取的第二人脸图像的特征提取而得,所述第二摄像头与所述第 一摄像头属于不同类型的摄像头;
根据所述参考相似度确定所述第一人脸特征与所述第二人脸特征是否对应相同人。
2、 根据权利要求 1所述的方法,其特征在于,
所述第一摄像头为热成像摄像头,所述第二摄像头为可见光摄像头;
或者,所述第一摄像头为可见光摄像头,所述第一摄像头为热成像摄像头。
3、 根据权利要求 1或 2所述的方法,其特征在于,所述根据所述参考相似度确定所 述第一人脸特征与所述第二人脸特征是否对应相同人,包括:
根据所述参考相似度、 参考误报率以及相似度阈值确定所述第一人脸特征与所述第二 人脸特征是否对应相同人;其中,不同的误报率对应不同的相似度阈值。
4、 根据权利要求 1或 2所述的方法,其特征在于,所述根据所述参考相似度确定所 述第一人脸特征与所述第二人脸特征是否对应相同人,包括:
根据所述参考相似度以及阈值信息确定归一化后的参考相似度;
根据所述归一化后的参考相似度确定所述第一人脸特征与所述第二人脸特征是否对 应相同人。
5、 根据权利要求 1-4任一项所述的方法,其特征在于,所述提取所述第一人脸图像的 第_人脸特征,包括:
将所述第一人脸图像输入预先训练完成的神经网络,通过所述神经网络输出所述第一 人脸图像的第一人脸特征;其中,所述神经网络基于第一类型图像样本和第二类型图像样 本训练得到,所述第一类型图像样本和所述第二类型图像样本由不同类型的摄像头拍摄得 到,且所述第一类型图像样本和所述第二类型图像样本中包括人脸。
6、 根据权利要求 5 所述的方法,其特征在于,所述神经网络基于所述第一类型图像 样本、 所述第二类型图像样本和混合类型图像样本训练得到,所述混合类型图像样本由所 述第一类型图像样本和所述第二类型图像样本配对而得。
1、 根据权利要求 1-6任一项所述的方法,其特征在于,所述第一摄像头包括车载摄像 头,所述通过第一摄像头获取第一人脸图像,包括:
通过所述车载摄像头获取所述第一人脸图像,所述第一人脸图像包括车辆的用车人的 人脸图像。
8、 根据权利要求 7 所述的方法,其特征在于,所述用车人包括驾驶所述车辆的人、 乘坐所述车辆的人、 对所述车辆进行修理的人、 给所述车辆加油的人以及控制所述车辆的 人中的一项或多项。
9、 根据权利要求 7 所述的方法,其特征在于,所述用车人包括驾驶所述车辆的人, 所述通过所述车载摄像头获取所述第一人脸图像,包括: 在接收到触发指令的情况下,通过所述车载摄像头获取所述第一人脸图像; 或者,在所述车辆运行时,通过所述车载摄像头获取所述第一人脸图像;
或者,在所述车辆的运行速度达到参考速度的情况下,通过所述车载摄像头获取所述 第一人脸图像。
10、 根据权利要求 7-9任一项所述的方法,其特征在于,所述第二人脸图像为对所述 用车人进行人脸注册的图像,所述将所述第一人脸特征与预先存储的第二人脸特征进行对 比之前,所述方法还包括:
通过所述第二摄像头获取所述第二人脸图像;
提取所述第二人脸图像的第二人脸特征;
保存所述第二人脸图像的第二人脸特征。
11、 一种神经网络训练方法,其特征在于,包括:
获取第一类型图像样本和第二类型图像样本,所述第一类型图像样本和所述第二类型 图像样本由不同类型的摄像头拍摄得到,且所述第一类型图像样本和所述第二类型图像样 本中包括人脸;
根据所述第一类型图像样本和所述第二类型图像样本训练神经网络。
12、 根据权利要求 11所述的方法,其特征在于,所述根据所述第一类型图像样本和所 述第二类型图像样本训练神经网络,包括:
将所述第一类型图像样本和所述第二类型图像样本配对,得到所述第一类型图像样本 和所述第二类型图像样本的混合类型图像样本;
根据所述第一类型图像样本、 所述第二类型图像样本和所述混合类型图像样本,训练 所述神经网络。
13、 根据权利要求 12 所述的方法,其特征在于,所述根据所述第一类型图像样本、 所述第二类型图像样本和所述混合类型图像样本,训练所述神经网络,包括:
通过所述神经网络获取所述第一类型图像样本的人脸预测结果、 所述第二类型图像样 本的人脸预测结果和所述混合类型图像样本的人脸预测结果;
根据所述第一类型图像样本的人脸预测结果和人脸标注结果的差异、 所述第二类型图 像样本的人脸预测结果和人脸标注结果之间的差异、 以及所述混合类型图像样本的人脸预 测结果和人脸标注结果的差异,训练所述神经网络。
14、 根据权利要求 13 所述的方法,其特征在于,所述神经网络中包括第一分类器、 第二分类器和混合分类器,所述通过所述神经网络获取所述第一类型图像样本的人脸预测 结果、 所述第二类型图像样本的人脸预测结果和所述混合类型图像样本的人脸预测结果, 包括:
将所述第一类型图像样本的人脸特征输入至所述第一分类器中,得到所述第一类型图 像样本的人脸预测结果;
将所述第二类型图像样本的人脸特征输入至所述第二分类器中,得到所述第二类型图 像样本的人脸预测结果;
将所述混合类型图像样本的人脸特征输入至所述混合分类器中,得到所述混合类型图 像样本的人脸预测结果。 15、 根据权利要求 14所述的方法,其特征在于,所述方法还包括:
在训练完成的所述神经网络中去除所述第一分类器、 所述第二分类器和所述混合分类 器,得到用于进行人脸识别的神经网络。
16、 一种人脸识别装置,其特征在于,包括:
第一获取单元,用于通过第一摄像头获取第一人脸图像;
第一提取单元,用于提取所述第一人脸图像的第一人脸特征;
对比单元,用于将所述第一人脸特征与预先存储的第二人脸特征进行对比,获得参考 相似度,所述第二人脸特征经第二摄像头获取的第二人脸图像的特征提取而得,所述第二 摄像头与所述第一摄像头属于不同类型的摄像头;
确定单元,用于根据所述参考相似度确定所述第一人脸特征与所述第二人脸特征是否 对应相同人。
17、 根据权利要求 16所述的装置,其特征在于,
所述第一摄像头为热成像摄像头,所述第二摄像头为可见光摄像头;
或者,所述第一摄像头为可见光摄像头,所述第一摄像头为热成像摄像头。
18、 根据权利要求 16或 17所述的装置,其特征在于,
所述确定单元,具体用于根据所述参考相似度、 参考误报率以及相似度阈值确定所述 第一人脸特征与所述第二人脸特征是否对应相同人;其中,不同的误报率对应不同的相似 度阈值。
19、 根据权利要求 16或 17所述的装置,其特征在于,
所述确定单元,具体用于根据所述参考相似度以及阈值信息确定归一化后的参考相似 度;以及根据所述归一化后的参考相似度确定所述第一人脸特征与所述第二人脸特征是否 对应相同人。
20、 根据权利要求 16-19任_项所述的装置,其特征在于,
所述第一提取单元,具体用于将所述第一人脸图像输入预先训练完成的神经网络,通 过所述神经网络输出所述第一人脸图像的第一人脸特征;其中,所述神经网络基于第一类 型图像样本和第二类型图像样本训练得到,所述第一类型图像样本和所述第二类型图像样 本由不同类型的摄像头拍摄得到,且所述第一类型图像样本和所述第二类型图像样本中包 括人脸。
21、 根据权利要求 20 所述的装置,其特征在于,所述神经网络基于所述第一类型图 像样本、 所述第二类型图像样本和混合类型图像样本训练得到,所述混合类型图像样本由 所述第一类型图像样本和所述第二类型图像样本配对而得。
22、 根据权利要求 16-21任一项所述的装置,其特征在于,所述第一摄像头包括车载 摄像头,
所述第一获取单元,具体用于通过所述车载摄像头获取所述第一人脸图像,所述第一 人脸图像包括车辆的用车人的人脸图像。
23、 根据权利要求 22所述的装置,其特征在于,所述用车人包括驾驶所述车辆的人、 乘坐所述车辆的人、 对所述车辆进行修理的人、 给所述车辆加油的人以及控制所述车辆的 人中的一项或多项。 24、 根据权利要求 22所述的装置,其特征在于,所述用车人包括驾驶所述车辆的人, 所述第一获取单元,具体用于在接收到触发指令的情况下,通过所述车载摄像头获取所述 第一人脸图像;
或者,所述第一获取单元,具体用于在所述车辆运行时,通过所述车载摄像头获取所 述第 _人脸图像;
或者,所述第一获取单元,具体用于在所述车辆的运行速度达到参考速度的情况下, 通过所述车载摄像头获取所述第一人脸图像。
25、 根据权利要求 22-24任一项所述的装置,其特征在于,所述第二人脸图像为对所 述用车人进行人脸注册的图像,所述装置还包括:
第二获取单元,用于通过所述第二摄像头获取所述第二人脸图像;
第二提取单元,用于提取所述第二人脸图像的第二人脸特征;
保存单元,用于保存所述第二人脸图像的第二人脸特征。
26、 一种神经网络训练装置,其特征在于,包括:
获取单元,用于获取第一类型图像样本和第二类型图像样本,所述第一类型图像样本 和所述第二类型图像样本由不同类型的摄像头拍摄得到,且所述第一类型图像样本和所述 第二类型图像样本中包括人脸;
训练单元,用于根据所述第一类型图像样本和所述第二类型图像样本训练神经网络。
27、 根据权利要求 26所述的装置,其特征在于,所述训练单元包括:
配对子单元,用于将所述第一类型图像样本和所述第二类型图像样本配对,得到所述 第一类型图像样本和所述第二类型图像样本的混合类型图像样本;
训练子单元,用于根据所述第一类型图像样本、 所述第二类型图像样本和所述混合类 型图像样本,训练所述神经网络。
28、 根据权利要求 27所述的装置,其特征在于,
所述训练子单元,具体用于通过所述神经网络获取所述第一类型图像样本的人脸预测 结果、 所述第二类型图像样本的人脸预测结果和所述混合类型图像样本的人脸预测结果; 以及根据所述第一类型图像样本的人脸预测结果和人脸标注结果的差异、 所述第二类型图 像样本的人脸预测结果和人脸标注结果之间的差异、 以及所述混合类型图像样本的人脸预 测结果和人脸标注结果的差异,训练所述神经网络。
29、 根据权利要求 28 所述的装置,其特征在于,所述神经网络中包括第一分类器、 第二分类器和混合分类器,
所述训练子单元,具体用于将所述第一类型图像样本的人脸特征输入至所述第一分类 器中,得到所述第一类型图像样本的人脸预测结果;以及将所述第二类型图像样本的人脸 特征输入至所述第二分类器中,得到所述第二类型图像样本的人脸预测结果;以及将所述 混合类型图像样本的人脸特征输入至所述混合分类器中,得到所述混合类型图像样本的人 脸预测结果。
30、 根据权利要求 29所述的装置,其特征在于,所述装置还包括:
神经网络应用单元,用于在训练完成的所述神经网络中去除所述第一分类器、 所述第 二分类器和所述混合分类器,得到用于进行人脸识别的神经网络。 31、 一种电子设备,其特征在于,包括处理器和存储器,所述处理器和所述存储器耦 合;其中,所述存储器用于存储程序指令,所述程序指令被所述处理器执行时,使所述处 理器执行权利要求 1-10任一项所述的方法;和/或,使所述处理器执行权利要求 11-15任一 项所述的方法。
32、 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有计算 机程序,所述计算机程序包括程序指令,所述程序指令当被处理器执行时,使所述处理器 执行权利要求 1-10任一项所述的方法;和/或,使所述处理器执行权利要求 11-15任一项所 述的方法。
PCT/CN2019/114674 2019-02-26 2019-10-31 人脸识别方法、神经网络训练方法、装置及电子设备 Ceased WO2020173117A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2021540572A JP7402239B2 (ja) 2019-02-26 2019-10-31 顔認識方法、ニューラルネットワークのトレーニング方法、顔認識装置、電子機器及びコンピュータ可読記憶媒体
KR1020217022399A KR20210101313A (ko) 2019-02-26 2019-10-31 얼굴 인식 방법, 신경망 훈련방법, 장치 및 전자 디바이스

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910145024.9A CN109886222B (zh) 2019-02-26 2019-02-26 人脸识别方法、神经网络训练方法、装置及电子设备
CN201910145024.9 2019-02-26

Publications (1)

Publication Number Publication Date
WO2020173117A1 true WO2020173117A1 (zh) 2020-09-03

Family

ID=66929610

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/114674 Ceased WO2020173117A1 (zh) 2019-02-26 2019-10-31 人脸识别方法、神经网络训练方法、装置及电子设备

Country Status (4)

Country Link
JP (1) JP7402239B2 (zh)
KR (1) KR20210101313A (zh)
CN (1) CN109886222B (zh)
WO (1) WO2020173117A1 (zh)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112199998A (zh) * 2020-09-09 2021-01-08 浙江大华技术股份有限公司 一种人脸识别方法、装置、设备及介质
CN112241698A (zh) * 2020-10-12 2021-01-19 安徽富煌科技股份有限公司 一种基于人脸识别的公交车载机
CN113807319A (zh) * 2021-10-15 2021-12-17 云从科技集团股份有限公司 人脸识别优化方法、装置、设备和介质
CN114842261A (zh) * 2022-05-10 2022-08-02 西华师范大学 图像处理方法、装置、电子设备及存储介质
WO2022226478A1 (en) * 2021-04-21 2022-10-27 Tascent, Inc. Thermal based presentation attack detection for biometric systems
CN116311477A (zh) * 2023-05-15 2023-06-23 华中科技大学 一种面向跨身份一致性的面部运动单元检测模型构建方法
CN116363450A (zh) * 2023-03-01 2023-06-30 北京爱笔科技有限公司 图片识别模型训练与图片识别方法、系统、设备及介质

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109886222B (zh) * 2019-02-26 2022-03-15 北京市商汤科技开发有限公司 人脸识别方法、神经网络训练方法、装置及电子设备
CN110244728A (zh) * 2019-06-17 2019-09-17 北京三快在线科技有限公司 确定无人驾驶控制策略的方法、装置、设备及存储介质
CN110263744B (zh) * 2019-06-26 2021-05-11 苏州万店掌网络科技有限公司 提高无感人脸识别率的方法
CN111160149B (zh) * 2019-12-16 2023-05-23 山东大学 基于运动场景及深度学习的车载人脸识别系统及方法
CN110874588B (zh) * 2020-01-17 2020-04-14 南京甄视智能科技有限公司 动态优化人脸识别中光线影响的方法与装置
CN112809697B (zh) * 2021-01-11 2022-05-13 福建思特电子有限公司 一种5g智能门卫机器人
CN114519863B (zh) * 2021-12-30 2025-04-25 深圳云天励飞技术股份有限公司 人体重识别方法、人体重识别装置、计算机设备及介质
CN115601734A (zh) * 2022-10-26 2023-01-13 上海东普信息科技有限公司(Cn) 驾驶员更换识别方法、装置、设备及存储介质
WO2025089912A1 (ko) * 2023-10-27 2025-05-01 삼성전자 주식회사 전자 장치 및 전자 장치에서 데이터를 클러스터링하는 방법

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108108711A (zh) * 2017-12-29 2018-06-01 深圳云天励飞技术有限公司 人脸布控方法、电子设备及存储介质
CN108765407A (zh) * 2018-05-31 2018-11-06 上海依图网络科技有限公司 一种人像图片质量判定方法及装置
CN109147940A (zh) * 2018-07-05 2019-01-04 北京昆仑医云科技有限公司 从患者的医学图像自动预测生理状况的装置和系统
CN109241888A (zh) * 2018-08-24 2019-01-18 北京旷视科技有限公司 神经网络训练与对象识别方法、装置和系统及存储介质
CN109886222A (zh) * 2019-02-26 2019-06-14 北京市商汤科技开发有限公司 人脸识别方法、神经网络训练方法、装置及电子设备

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7406184B2 (en) * 2002-07-03 2008-07-29 Equinox Corporation Method and apparatus for using thermal infrared for face recognition
CN102622579B (zh) * 2012-02-20 2014-03-19 华焦宝 人脸预警方法及系统
CN105608450B (zh) * 2016-03-01 2018-11-27 天津中科智能识别产业技术研究院有限公司 基于深度卷积神经网络的异质人脸识别方法
CN108491805B (zh) * 2018-03-27 2022-02-22 百度在线网络技术(北京)有限公司 身份认证方法和装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108108711A (zh) * 2017-12-29 2018-06-01 深圳云天励飞技术有限公司 人脸布控方法、电子设备及存储介质
CN108765407A (zh) * 2018-05-31 2018-11-06 上海依图网络科技有限公司 一种人像图片质量判定方法及装置
CN109147940A (zh) * 2018-07-05 2019-01-04 北京昆仑医云科技有限公司 从患者的医学图像自动预测生理状况的装置和系统
CN109241888A (zh) * 2018-08-24 2019-01-18 北京旷视科技有限公司 神经网络训练与对象识别方法、装置和系统及存储介质
CN109886222A (zh) * 2019-02-26 2019-06-14 北京市商汤科技开发有限公司 人脸识别方法、神经网络训练方法、装置及电子设备

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112199998A (zh) * 2020-09-09 2021-01-08 浙江大华技术股份有限公司 一种人脸识别方法、装置、设备及介质
CN112199998B (zh) * 2020-09-09 2023-06-20 浙江大华技术股份有限公司 一种人脸识别方法、装置、设备及介质
CN112241698A (zh) * 2020-10-12 2021-01-19 安徽富煌科技股份有限公司 一种基于人脸识别的公交车载机
WO2022226478A1 (en) * 2021-04-21 2022-10-27 Tascent, Inc. Thermal based presentation attack detection for biometric systems
US12277803B2 (en) 2021-04-21 2025-04-15 Assa Abloy Global Solutions Ab Thermal based presentation attack detection for biometric systems
CN113807319A (zh) * 2021-10-15 2021-12-17 云从科技集团股份有限公司 人脸识别优化方法、装置、设备和介质
CN114842261A (zh) * 2022-05-10 2022-08-02 西华师范大学 图像处理方法、装置、电子设备及存储介质
CN116363450A (zh) * 2023-03-01 2023-06-30 北京爱笔科技有限公司 图片识别模型训练与图片识别方法、系统、设备及介质
CN116311477A (zh) * 2023-05-15 2023-06-23 华中科技大学 一种面向跨身份一致性的面部运动单元检测模型构建方法

Also Published As

Publication number Publication date
JP7402239B2 (ja) 2023-12-20
JP2022521038A (ja) 2022-04-05
CN109886222B (zh) 2022-03-15
KR20210101313A (ko) 2021-08-18
CN109886222A (zh) 2019-06-14

Similar Documents

Publication Publication Date Title
JP7402239B2 (ja) 顔認識方法、ニューラルネットワークのトレーニング方法、顔認識装置、電子機器及びコンピュータ可読記憶媒体
CN111291740B (zh) 一种人脸识别模型的训练方法、人脸识别方法及硬件
TWI712980B (zh) 理賠資訊提取方法和裝置、電子設備
CN107273872A (zh) 用于图像或视频中行人重识别的深度判别网络模型方法
CN110163078A (zh) 活体检测方法、装置及应用活体检测方法的服务系统
CN110033011A (zh) 车祸事故处理方法和装置、电子设备
CN108197326A (zh) 一种车辆检索方法及装置、电子设备、存储介质
CN113936302B (zh) 行人重识别模型的训练方法、装置、计算设备及存储介质
CN108323209B (zh) 信息处理方法、系统、云处理设备以及计算机存储介质
CN109977771A (zh) 司机身份的验证方法、装置、设备及计算机可读存储介质
CN113920550A (zh) 手指真伪识别方法、电子装置及存储介质
WO2022063002A1 (zh) 人车信息关联方法、装置、设备及存储介质
CN113591620A (zh) 一种基于一体式移动采集设备的预警方法、装置及系统
CN111652210A (zh) 一种车牌字符智能识别系统
CN110619280B (zh) 一种基于深度联合判别学习的车辆重识别方法及装置
CN112686076A (zh) 一种图像处理方法、系统及计算机可读存储介质
CN114581897A (zh) 一种多类型和多车牌的车牌识别方法、装置以及系统
CN113705643A (zh) 一种目标物检测方法、装置以及电子设备
CN118411776B (zh) 一种基于人工智能的多模态门禁系统
CN114495204B (zh) 一种自动驾驶车辆双端乘客身份验证方法
CN103955668B (zh) 基于图像质量评价的合成人脸图像识别方法
CN111368729A (zh) 一种基于孪生神经网络的车辆身份判别方法
CN118451417A (zh) 基于大模型的交通盗抢识别方法、装置、系统及存储介质
CN115131564A (zh) 基于人工智能的车辆部件损伤检测方法及相关设备
CN114998936A (zh) 一种基于变速率条件下行人重识别方法及系统

Legal Events

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

Ref document number: 19916706

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2021540572

Country of ref document: JP

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 20217022399

Country of ref document: KR

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS (EPO FORM 1205A DATED 21.01.2022)

122 Ep: pct application non-entry in european phase

Ref document number: 19916706

Country of ref document: EP

Kind code of ref document: A1