CN111881813B - Data storage method and system of face recognition terminal - Google Patents

Data storage method and system of face recognition terminal Download PDF

Info

Publication number
CN111881813B
CN111881813B CN202010724616.9A CN202010724616A CN111881813B CN 111881813 B CN111881813 B CN 111881813B CN 202010724616 A CN202010724616 A CN 202010724616A CN 111881813 B CN111881813 B CN 111881813B
Authority
CN
China
Prior art keywords
vector
data
target
alpha
face
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010724616.9A
Other languages
Chinese (zh)
Other versions
CN111881813A (en
Inventor
张达
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Cardlan Technology Co ltd
Original Assignee
Shenzhen Cardlan Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Cardlan Technology Co ltd filed Critical Shenzhen Cardlan Technology Co ltd
Priority to CN202010724616.9A priority Critical patent/CN111881813B/en
Publication of CN111881813A publication Critical patent/CN111881813A/en
Application granted granted Critical
Publication of CN111881813B publication Critical patent/CN111881813B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/161Detection; Localisation; Normalisation
    • G06V40/166Detection; Localisation; Normalisation using acquisition arrangements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/041Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means
    • G06F3/044Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means by capacitive means
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/168Feature extraction; Face representation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/172Classification, e.g. identification
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16HHEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
    • G16H80/00ICT specially adapted for facilitating communication between medical practitioners or patients, e.g. for collaborative diagnosis, therapy or health monitoring

Abstract

The embodiment of the application provides a data storage method of a face recognition terminal, which comprises the following steps: the face recognition terminal acquires a target image of a target object and extracts a target face picture of the target image; the face recognition terminal stores the data of the target face picture, extracts the stored data and verifies the data; when the face recognition terminal passes verification, the target object is determined to be a first identity corresponding to the preset face module. The technical scheme provided by the application has the advantage of low storage overhead.

Description

Data storage method and system of face recognition terminal
Technical Field
The application relates to the technical field of artificial intelligence, in particular to a data storage method and system of a face recognition terminal.
Background
Face recognition is a biometric technology for identity recognition based on facial feature information of a person. A series of related technologies, also commonly called face recognition and face recognition, are used to collect images or video streams containing faces by using a camera or a video camera, automatically detect and track the faces in the images, and then perform face recognition on the detected faces.
The face recognition terminal is a terminal with a face recognition function, such as an intelligent camera, an intelligent television, an intelligent mobile phone, and the like, and due to the limitations of the cost and the space of the terminal, the storage space of the terminal is limited, so that the overhead of data storage of the existing face recognition terminal is large.
Disclosure of Invention
The embodiment of the application discloses a data storage method of a face recognition terminal, which can reduce the data storage overhead and improve the face recognition efficiency.
A first aspect of an embodiment of the present application provides a data storage method for a face recognition terminal, where the method is applied to a user equipment UE, where the face recognition is based on AI model recognition, and the AI model includes: a plurality of convolution kernels and a full-link layer, wherein the method comprises the steps of:
the face recognition terminal acquires a target image of a target object and extracts a target face picture of the target image; the face recognition terminal stores the data of the target face picture, extracts the stored data and verifies the data;
when the face recognition terminal passes verification, determining that the target object is a first identity corresponding to a preset face module
In a second aspect, a face recognition terminal is provided, where the face recognition is based on AI model recognition, and the AI model includes: a plurality of convolution kernels and a full link layer, wherein the terminal comprises:
an acquisition unit for acquiring a target image of a target object and extracting a target face image of the target image
The processing unit is used for storing the data of the target face picture, extracting the stored data and verifying the data; and when the verification is passed, determining that the target object is a first identity corresponding to the preset face module.
A third aspect of embodiments of the present application provides a terminal comprising a processor, a memory, a communication interface, and one or more programs stored in the memory and configured to be executed by the processor, the programs comprising instructions for performing the steps of the method of the first aspect.
A fourth aspect of embodiments of the present application discloses a computer-readable storage medium storing a computer program for electronic data exchange, wherein the computer program causes a computer to execute the method of the first aspect.
A fifth aspect of embodiments of the present application discloses a computer program product, wherein the computer program product comprises a non-transitory computer-readable storage medium storing a computer program, the computer program being operable to cause a computer to perform some or all of the steps as described in the first aspect of embodiments of the present application. The computer program product may be a software installation package.
Drawings
The drawings used in the embodiments of the present application are described below.
Fig. 1 is a schematic structural diagram of a terminal according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a data storage method of a face recognition terminal according to an embodiment of the present application;
FIG. 2a is a schematic diagram of an arrangement storage provided by an embodiment of the present application;
FIG. 2b is a diagram illustrating the dimensions of a convolution kernel provided by an embodiment of the present application;
fig. 2c is a schematic diagram of the matrix size CI × CH of the input data and the 3 × 3 convolution kernel.
Detailed Description
The embodiments of the present application will be described below with reference to the drawings.
The term "and/or" in this application is only one kind of association relationship describing the associated object, and means that there may be three kinds of relationships, for example, a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" in this document indicates that the former and latter related objects are in an "or" relationship.
The "plurality" appearing in the embodiments of the present application means two or more. The descriptions of the first, second, etc. appearing in the embodiments of the present application are only for illustrating and differentiating the objects, and do not represent the order or the particular limitation of the number of the devices in the embodiments of the present application, and do not constitute any limitation to the embodiments of the present application. The term "connect" in the embodiments of the present application refers to various connection manners, such as direct connection or indirect connection, to implement communication between devices, which is not limited in this embodiment of the present application.
A terminal in the embodiments of the present application may refer to various forms of UE, access terminal, subscriber unit, subscriber station, mobile station, MS (mobile station), remote station, remote terminal, mobile device, user terminal, terminal device (terminal equipment), wireless communication device, user agent, or user equipment. The terminal device may also be a cellular phone, a cordless phone, an SIP (session initiation protocol) phone, a WLL (wireless local loop) station, a PDA (personal digital assistant) with a wireless communication function, a handheld device with a wireless communication function, a computing device or other processing device connected to a wireless modem, a vehicle-mounted device, a wearable device, a terminal device in a future 5G network or a terminal device in a future evolved PLMN (public land mobile network, chinese), and the like, which are not limited in this embodiment.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a terminal disclosed in an embodiment of the present application, the terminal 100 includes a storage and processing circuit 110, and a sensor 170 connected to the storage and processing circuit 110, where the sensor 170 may include a camera, a distance sensor, a gravity sensor, and the like, the electronic device may include two transparent display screens, the transparent display screens are disposed on a back side and a front side of the electronic device, and part or all of components between the two transparent display screens may also be transparent, so that the electronic device may be a transparent electronic device in terms of visual effect, and if part of the components are transparent, the electronic device may be a hollow electronic device. Wherein:
the terminal 100 may include control circuitry, which may include storage and processing circuitry 110. The storage and processing circuitry 110 may be a memory, such as a hard drive memory, a non-volatile memory (e.g., flash memory or other electronically programmable read-only memory used to form a solid state drive, etc.), a volatile memory (e.g., static or dynamic random access memory, etc.), etc., and the embodiments of the present application are not limited thereto. Processing circuitry in the storage and processing circuitry 110 may be used to control the operation of the terminal 100. The processing circuitry may be implemented based on one or more microprocessors, microcontrollers, digital signal processors, baseband processors, power management units, audio codec chips, application specific integrated circuits, display driver integrated circuits, and the like.
The storage and processing circuitry 110 may be used to run software in the terminal 100, such as an Internet browsing application, a Voice Over Internet Protocol (VOIP) telephone call application, an email application, a media playing application, operating system functions, and so forth. Such software may be used to perform control operations such as camera-based image capture, ambient light measurement based on an ambient light sensor, proximity sensor measurement based on a proximity sensor, information display functionality based on status indicators such as status indicator lights of light emitting diodes, touch event detection based on a touch sensor, functionality associated with displaying information on multiple (e.g., layered) display screens, operations associated with performing wireless communication functionality, operations associated with collecting and generating audio signals, control operations associated with collecting and processing button press event data, and other functions in the terminal 100, to name a few, embodiments of the present application are not limited.
The terminal 100 may include an input-output circuit 150. The input-output circuit 150 may be used to enable the terminal 100 to input and output data, i.e., to allow the terminal 100 to receive data from external devices and also to allow the terminal 100 to output data from the terminal 100 to external devices. The input-output circuit 150 may further include a sensor 170. Sensor 170 vein identification module, can also include ambient light sensor, proximity sensor based on light and electric capacity, fingerprint identification module, touch sensor (for example, based on light touch sensor and/or capacitanc touch sensor, wherein, touch sensor can be touch-control display screen's partly, also can regard as a touch sensor structure independent utility), acceleration sensor, the camera, and other sensors etc. the camera can be leading camera or rear camera, the fingerprint identification module can integrate in the display screen below, be used for gathering the fingerprint image, the fingerprint identification module can be: optical fingerprint module, etc., and is not limited herein. The front camera can be arranged below the front display screen, and the rear camera can be arranged below the rear display screen. Of course, the front camera or the rear camera may not be integrated with the display screen, and certainly in practical applications, the front camera or the rear camera may also be a lifting structure.
Input-output circuit 150 may also include one or more display screens, and when multiple display screens are provided, such as 2 display screens, one display screen may be provided on the front of the electronic device and another display screen may be provided on the back of the electronic device, such as display screen 130. The display 130 may include one or a combination of liquid crystal display, transparent display, organic light emitting diode display, electronic ink display, plasma display, and display using other display technologies. The display screen 130 may include an array of touch sensors (i.e., the display screen 130 may be a touch display screen). The touch sensor may be a capacitive touch sensor formed by a transparent touch sensor electrode (e.g., an Indium Tin Oxide (ITO) electrode) array, or may be a touch sensor formed using other touch technologies, such as acoustic wave touch, pressure sensitive touch, resistive touch, optical touch, and the like, and the embodiments of the present application are not limited thereto.
The terminal 100 can also include an audio component 140. Audio component 140 may be used to provide audio input and output functionality for terminal 100. The audio components 140 in the terminal 100 may include a speaker, a microphone, a buzzer, a tone generator, and other components for generating and detecting sound.
The communication circuit 120 can be used to provide the terminal 100 with the capability to communicate with external devices. The communication circuit 120 may include analog and digital input-output interface circuits, and wireless communication circuits based on radio frequency signals and/or optical signals. The wireless communication circuitry in communication circuitry 120 may include radio-frequency transceiver circuitry, power amplifier circuitry, low noise amplifiers, switches, filters, and antennas. For example, the wireless Communication circuitry in Communication circuitry 120 may include circuitry to support Near Field Communication (NFC) by transmitting and receiving Near Field coupled electromagnetic signals. For example, the communication circuit 120 may include a near field communication antenna and a near field communication transceiver. The communications circuitry 120 may also include a cellular telephone transceiver and antenna, a wireless local area network transceiver circuitry and antenna, and so forth.
The terminal 100 may further include a battery, a power management circuit, and other input-output units 160. The input-output unit 160 may include buttons, joysticks, click wheels, scroll wheels, touch pads, keypads, keyboards, cameras, light emitting diodes and other status indicators, and the like.
A user may input commands through input-output circuitry 150 to control operation of terminal 100 and may use output data of input-output circuitry 150 to enable receipt of status information and other outputs from terminal 100.
The face recognition is based on an AI model, the AI model has multiple layers, the front multiple layers of a general AI model are an input layer, multiple convolution layers and a full connection layer, and for the operation that the full connection layer is actually a matrix-by-matrix, because the storage space of an AI chip in a terminal is limited, how to utilize the effective storage efficiency becomes an important way for solving the face recognition.
Referring to fig. 2, fig. 2 provides a data storage method of a face recognition terminal, where the method may be executed by the face recognition terminal, and the face recognition terminal may specifically be the terminal shown in fig. 1, and the method shown in fig. 2 includes the following steps:
step S201, a face recognition terminal acquires a target image of a target object and extracts a target face picture of the target image;
step S202, the face recognition terminal stores the data of the target face picture, extracts the stored data and verifies the data;
step S203, when the face recognition terminal passes the verification, the target object is determined to be a first identity corresponding to the preset face module.
In the specific implementation, a preset face template can be stored in the electronic device in advance, the original image of the target object can be obtained through the camera, and then the first identity of the target object can be determined when the target face image is successfully matched with the preset face template by the electronic device, otherwise, the first identity of the target object is not determined, so that the identity of the target object can be identified, whether the first identity is a reserved patient or not can be judged, and the fact that other people start telemedicine is avoided.
Further, in a possible example, in the step S202, the extracting the stored data for verification may include the following steps:
e21, performing region segmentation on the target face image to obtain a target face region, wherein the target face region is a region image only of a face;
e22, performing binarization processing on the target face area to obtain a binarized face image;
e23, dividing the binary face image into a plurality of regions, wherein the areas of the regions are the same and the area size is larger than a preset area value;
e24, extracting the characteristic points of the binary face image to obtain a plurality of characteristic points;
e25, determining the distribution density of the feature points corresponding to each of the plurality of areas according to the plurality of feature points to obtain a plurality of distribution densities of the feature points;
e26, determining a target mean square error according to the distribution densities of the plurality of feature points;
e27, determining a target quality evaluation value corresponding to the target mean square error according to a preset mapping relation between the mean square error and the quality evaluation value;
e28, when the target quality evaluation value is smaller than the preset quality evaluation value, performing image enhancement processing on the target face image, and matching the target face image subjected to the image enhancement processing with a preset face template to obtain a matching value;
e29, when the matching value is larger than a preset threshold value, determining that the target face image is verified.
In specific implementation, the preset threshold and the preset area value can be set by a user or default by a system, and the preset face template can be stored in the electronic device in advance. The electronic device may obtain a region segmentation of the target face image to obtain a target face region, where the target face region may be a region that does not include a background but only includes a face, that is, a region image of only a face. And then, can carry out binarization processing to target face region, obtain two quantification face image, so, can reduce the image complexity, divide two quantification face image into a plurality of regions, the area size of each region is equal, and is greater than preset area value. Further, feature point extraction may be performed on the binarized face image to obtain a plurality of feature points, and an algorithm of the feature extraction may be at least one of the following: scale Invariant Feature Transform (SIFT), SURF, pyramid, harris corner detection, and the like, without limitation.
Further, the electronic device may determine, according to the plurality of feature points, a feature point distribution density corresponding to each of the plurality of regions to obtain a plurality of feature point distribution densities, and determine a target mean square error according to the plurality of feature point distribution densities, the electronic device may pre-store a mapping relationship between a preset mean square error and a quality evaluation value, and determine, according to the mapping relationship between the preset mean square error and the quality evaluation value, a target quality evaluation value corresponding to the target mean square error, where the smaller the mean square error is, the larger the quality evaluation value is, when the target quality evaluation value is greater than the preset quality evaluation value, directly match the target face image with a preset face template, and when a matching value therebetween is greater than a preset threshold, determine that the target face image is verified, and otherwise, determine that the target face image is verified.
Further, when the target quality evaluation value is smaller than the preset quality evaluation value, the terminal may perform image enhancement processing on the target face image, match the target face image after the image enhancement processing with the preset face template, and determine that the target face image passes verification if the matching value between the target face image and the preset face template is larger than a preset threshold value, otherwise, determine that the target face image fails verification.
The implementation method of the step S202 may also be implemented by AI identification, and the method may specifically include:
the face recognition terminal obtains input data and weight data of the target face picture, if the face recognition terminal executes convolution layer operation, size Axi x Ayi of a weight (namely a convolution kernel) in ith convolution layer operation is extracted, if Ayi is larger than Axi, ith input data of the ith convolution layer is stored according to a dimensionality corresponding to Ayi of the innermost layer, and the stored data is extracted to execute face recognition operation for verification. The storing according to the dimension corresponding to the innermost layer of Ayi specifically may include: if Ayi is the height dimension, then the storage is performed by arranging in the height dimension, and the specific arrangement storage is shown in fig. 2a (taking the most superficial layer as an example). The technical scheme takes the larger dimension in the convolution kernel as the dimension of the innermost layer, so that the data extraction times can be reduced.
To illustrate a practical example, for example, the size of the convolution kernel is 3 × 4, where 3 is the width dimension and 4 is the height dimension, and specifically, as shown in fig. 2b as an example, if the dimension of the input data is Bx × By Bz; then By (height dimension) is taken as the innermost dimension, although the innermost dimension may also be taken as the width dimension, specifically determined By considering the size of the convolution kernel, so that the number of times of extraction can be reduced during data extraction.
The implementation method of the step S202 may also be implemented by AI identification, and the method may specifically include:
the face recognition terminal obtains input data and weight data of the target face picture, if the face recognition terminal executes full-connection layer operation and the full-connection layer is matrix multiplication operation, the input data and the weight data in the matrix multiplication operation are obtained, a weight matrix corresponding to the weight data is divided into n vectors (column values of the weight matrix) according to columns, each vector is a 1-column value in the weight matrix, each vector of the n vectors executes storage operation and calculation operation, and the storage operation specifically includes: determining the maximum number of the same element values in the α -th vector, arranging the element value β (β is a non-zero value) corresponding to the maximum value in the α -th vector to a head position (e.g., a first element position) of the α ' -th vector, and generating a bitmap (bitmap in which if the element value in the α -th vector is β, the bitmap is 1, otherwise, the bitmap is 0, e.g., 10,8,9,10 is the α -th vector, and β =10, the bitmap = 1001) of the α -th vector, arranging the bitmap to another position (e.g., a second element position, and if the position is insufficient, the bitmap is determined to be another position) of the head of the α ' -th vector, arranging the remaining elements of the α -th vector after the deletion of the element value β to subsequent positions (except for the head position) of the α ' -th vector, and storing the α ' -th vector in ascending order of line values of the α ' -th vector; the computing operation may specifically include: the face recognition terminal extracts an alpha 'vector and a row vector corresponding to the input data and the alpha' vector, adds element values of which bitmap is 1 in the row vector and then multiplies the added element values by a head position value of the alpha 'vector to obtain a product result, multiplies elements of the rest position of the row vector by corresponding element values of the rest position of the alpha' vector to obtain a product result, adds all the product results to obtain a full-connection operation result, performs storage operation and calculation operation on the input data and weight data to obtain a matrix multiplication result, and performs verification according to the matrix multiplication result. The verification method may be an existing method, for example, a difference value is calculated between a matrix multiplication result and a matrix multiplication result of a preset face module, and if the difference value is smaller than a similarity threshold, the identity of the target object is determined to be a first identity corresponding to the preset face module.
The technical scheme reduces the data volume of data storage and the number of multiplication operations, and takes an actual example as an example, for the element values in the matrix, 32 bits are occupied, if 64 elements exist in the alpha-th vector, 64 bits are needed by a bitmap, and each bit corresponds to whether each of the 64 elements is beta or not, so that the data volume stored is small as long as more than 3 element values are the same in the 64 elements, and in the actual application, the probability that vectors in the same column in weight data are the same is higher, so that the storage volume can be reduced, the data storage overhead is reduced, and the face recognition efficiency is improved.
The implementation method of the step S202 may also be implemented by AI identification, and the method may specifically include:
the face recognition terminal establishes input data according to the picture of the target object, inputs the input data into a face recognition model to execute n layers of convolution operation to obtain an nth layer of convolution operation result, inputs the nth layer of convolution operation result into a full-connection layer to execute full-connection operation to obtain a full-connection calculation result, calculates a difference value between the full-connection calculation result and a preset face template result, and if the difference value is smaller than a difference value threshold value, the UE determines that the identity of the target object is the identity of the preset face template.
In an optional scheme, the inputting the input data into the face recognition model to perform n-th layer of convolution operation to obtain an nth layer of convolution operation result specifically may include:
the face recognition terminal may be provided with an individual AI chip, the AI chip being configured to perform authentication of the target object, the AI chip including: the AI chip acquires a matrix size CI CH of input data, if the convolution kernel size in n layers of convolution operation is 3X 3 convolution kernels, the distribution calculation processing circuit divides the CI CH into CI/x data blocks (assuming that CI is an integer of x) according to the CI direction, distributes the CI/x data blocks to the x calculation processing circuits in sequence, the x calculation processing circuits respectively execute the ith layer of convolution operation on the 1 data block received and distributed and the ith layer of convolution kernel to obtain the ith convolution result (namely, the ith convolution result is obtained by sequentially combining x result matrixes (CI/x-2) (CH-2) of the x calculation processing circuits), and sends the result of 2 columns at the edge of the ith convolution result (the result of the adjacent columns is 2 columns obtained by calculation of different calculation processing circuits) to the distribution processing circuit, the x calculation processing circuits execute convolution operation on the ith layer of convolution result and the (i + 1) th layer of convolution kernel to obtain an (i + 1) th layer of convolution result, the (i + 1) th layer of convolution result is sent to the distribution calculation circuit, the distribution calculation processing circuit executes the ith layer of convolution operation on the (CI/x-1) th combined data block and the ith layer of convolution kernel to obtain an ith combined result, the ith combined result and the edge 2 column of the ith convolution result are spliced (the ith combined result is inserted into the middle of the edge 2 column according to the mathematical rule of the convolution operation) to obtain an (i + 1) th combined data block, the (i + 1) th combined data block and the (i + 1) th layer of convolution result are executed convolution operation to obtain an (i + 1) th combined result, and the (i + 1) th combined result is inserted into the (i + 1) th layer of convolution result between the edge column (the results of the adjacent columns are calculated by different calculation processing circuits) to obtain an (i + 1) th layer of convolution result And finally, the AI chip executes the operation of the residual convolution layer (convolution kernel after the i +1 layer) according to the convolution result of the (i + 1) th layer to obtain the convolution operation result of the nth layer. The combined data block may be a 4 × CI matrix composed of 4 columns of data between 2 adjacent data blocks, for example, a 4 × CH matrix composed of the last 2 columns of the 1 st data block (the data block allocated to the 1 st calculation processing circuit) and the first 2 columns of data of the 2 nd data block (the data block allocated to the 2 nd calculation processing circuit).
The calculation of the above-mentioned remaining convolutional layers can also be referred to the calculation of the i-th layer and the (i + 1) -th layer, where i is an integer not less than 1 and not more than n, where n is the total number of convolutional layers of the AI model, i is the layer number of the convolutional layer, CI is the column value of the matrix, and CH is the row value of the matrix.
Referring to fig. 2c (each box in fig. 2c represents an element value), fig. 2c is a schematic diagram of a matrix size CI × CH of input data and a schematic diagram of a 3 × 3 convolution kernel, and the above technical solution mainly saves transmission data between the distributed computation processing circuit and the x computation processing circuits, thereby reducing the number of data reading and I0 overhead, and achieving the advantage of improving computation efficiency. For a conventional distribution-computation structure, such as a master-slave structure, in the computation, each layer of convolution operation needs to return all the i-th layer of convolution results to the master structure, and then the i-th layer of convolution results is distributed to the slave structure to perform the i + 1-th layer of computation, but after the i-th layer of convolution operation is performed in the technical scheme of the application, only the results of adjacent 2 columns are sent to the distribution processing circuit, and the i + 1-th layer of convolution results is performed after the residual part of convolution results, so that the residual part of convolution results does not need to be returned to the distribution computation processing circuit, and the distribution computation processing circuit does not perform the convolution operation again, so that the distribution computation processing circuit can also reduce the distribution overhead, and further perform the convolution operation on the data of the combined part of data blocks to achieve the purpose of complete convolution operation.
The application also provides a face recognition terminal, face recognition is based on AI model identification, the AI model includes: a plurality of convolution kernels and a full link layer, wherein the terminal comprises:
the acquisition unit is used for acquiring a target image of a target object and extracting a target face image of the target image;
the processing unit is used for storing the data of the target face picture, extracting the stored data and verifying the data; and when the verification is passed, determining that the target object is a first identity corresponding to the preset face module.
Optionally, the processing unit is specifically configured to perform region segmentation on the target face image to obtain a target face region, where the target face region is a region image that is only a face; carrying out binarization processing on the target face area to obtain a binarization face image; dividing the binaryzation face image into a plurality of regions, wherein the areas of the regions are the same and the area size is larger than a preset area value; extracting feature points of the binarized face image to obtain a plurality of feature points; determining the distribution density of the characteristic points corresponding to each of the plurality of areas according to the plurality of characteristic points to obtain a plurality of distribution densities of the characteristic points; determining a target mean square error according to the distribution densities of the plurality of feature points; determining a target quality evaluation value corresponding to the target mean square error according to a preset mapping relation between the mean square error and the quality evaluation value; when the target quality evaluation value is smaller than the preset quality evaluation value, performing image enhancement processing on the target face image, and matching the target face image subjected to the image enhancement processing with a preset face template to obtain a matching value; and when the matching value is larger than a preset threshold value, determining that the target face image is verified to be passed.
An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, and when the computer program runs on a network device, the method flow shown in fig. 2 is implemented.
An embodiment of the present application further provides a computer program product, and when the computer program product runs on a terminal, the method flow shown in fig. 2 is implemented.
Embodiments of the present application also provide a terminal including a processor, a memory, a communication interface, and one or more programs stored in the memory and configured to be executed by the processor, the programs including instructions for performing the steps in the method of the embodiment shown in fig. 2.
The above description has introduced the solution of the embodiment of the present application mainly from the perspective of the method-side implementation process. It will be appreciated that the electronic device, in order to carry out the functions described above, may comprise corresponding hardware structures and/or software templates for performing the respective functions. Those of skill in the art will readily appreciate that the present application is capable of hardware or a combination of hardware and computer software implementing the various illustrative elements and algorithm steps described in connection with the embodiments provided herein. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiment of the present application, the electronic device may be divided into the functional units according to the method example, for example, each functional unit may be divided corresponding to each function, or two or more functions may be integrated into one processing unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit. It should be noted that the division of the unit in the embodiment of the present application is schematic, and is only a logic function division, and there may be another division manner in actual implementation.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art will also appreciate that the embodiments described in the specification are presently preferred and that no acts or templates referred to are necessarily required by the application.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the above-described division of the units is only one type of division of logical functions, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of some interfaces, devices or units, and may be an electric or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit may be stored in a computer readable memory if it is implemented in the form of a software functional unit and sold or used as a stand-alone product. Based on such understanding, the technical solution of the present application may be substantially implemented or a part of or all or part of the technical solution contributing to the prior art may be embodied in the form of a software product stored in a memory, and including several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the above-mentioned method of the embodiments of the present application. And the aforementioned memory comprises: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable memory, which may include: flash Memory disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
The foregoing detailed description of the embodiments of the present application has been presented to illustrate the principles and implementations of the present application, and the above description of the embodiments is only provided to help understand the method and the core concept of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (5)

1. A data storage method of a face recognition terminal is applied to User Equipment (UE), the face recognition is based on AI model recognition, and the AI model comprises: a plurality of convolution kernels and a full-link layer, wherein the method comprises the steps of:
the face recognition terminal acquires a target image of a target object and extracts a target face picture of the target image; the face recognition terminal stores the data of the target face picture, extracts the stored data and verifies the data; when the face recognition terminal passes verification, determining that a target object is a first identity corresponding to a preset face module;
the step of storing the data of the target face picture by the face recognition terminal, and the step of extracting the stored data for verification specifically comprises the following steps:
the method comprises the steps that a face recognition terminal obtains input data and weight data of a target face picture, if the face recognition terminal executes full-connection layer operation and the full-connection layer is matrix multiplication operation, the input data and the weight data in the matrix multiplication operation are obtained, a weight matrix corresponding to the weight data is divided into n vectors according to columns, each vector is a 1-column value in the weight matrix, each vector of the n vectors executes storage operation and calculation operation, and the storage operation specifically comprises the following steps: determining the maximum value of the number of the same element values in the alpha vector, arranging the element value beta corresponding to the maximum value of the number in the alpha vector to the head position of the alpha ' vector, generating a bitmap of the element value beta in the alpha vector, arranging the bitmap to the head residual position of the alpha ' vector, arranging the residual elements of the alpha vector after deleting the elements which are the same as the element value beta to the subsequent position of the alpha ' vector, and storing the alpha ' vector according to the ascending sequence of the line values of the alpha ' vector; the calculation operation specifically includes: the face recognition terminal extracts an alpha 'vector and a row vector corresponding to input data and the alpha' vector, adds element values of which bitmap is 1 in the row vector and then multiplies the added element values by a head position value of the alpha 'vector to obtain a product result, multiplies elements of the rest position of the row vector by corresponding element values of the rest position of the alpha' vector to obtain a product result, adds all the product results to obtain a full-connection operation result, performs storage operation and calculation operation on the input data and weight data to obtain a matrix multiplication result, and performs verification according to the matrix multiplication result; n is an integer greater than or equal to 1, and n is the column value of the weight data.
2. The method according to claim 1, wherein the face recognition terminal stores the data of the target face picture, and extracting the stored data for verification specifically comprises:
and the face recognition terminal acquires input data and weight data of the target face picture, if the face recognition terminal executes convolution layer operation, the size Axi x Ayi of the weight in the ith convolution layer operation is extracted, if Ayi is larger than Axi, the ith input data of the ith convolution layer is stored according to the dimensionality corresponding to the innermost layer Ayi, and the stored data is extracted to execute face recognition operation for verification.
3. A computer-readable storage medium, characterized in that a computer program for electronic data exchange is stored, wherein the computer program causes a computer to perform the method according to any one of claims 1-2.
4. A face recognition terminal, the face recognition being based on AI model recognition, the AI model comprising: a plurality of convolution kernels and a full link layer, wherein the terminal comprises:
an acquisition unit for acquiring a target image of a target object and extracting a target face image of the target image
The processing unit is used for storing the data of the target face picture, extracting the stored data and verifying the data; when the verification passes, determining that the target object is a first identity corresponding to a preset face module;
the step of storing the data of the target face picture by the face recognition terminal, and the step of extracting the stored data for verification specifically comprises the following steps:
the method comprises the steps that a face recognition terminal obtains input data and weight data of a target face picture, if the face recognition terminal executes full-connection layer operation and the full-connection layer is matrix multiplication operation, the input data and the weight data in the matrix multiplication operation are obtained, a weight matrix corresponding to the weight data is divided into n vectors according to columns, each vector is a 1-column value in the weight matrix, each vector of the n vectors executes storage operation and calculation operation, and the storage operation specifically comprises the following steps: determining the maximum value of the number of the same element values in the alpha vector, arranging the element value beta corresponding to the maximum value of the number in the alpha vector to the head position of the alpha ' vector, generating a bitmap of the element value beta in the alpha vector, arranging the bitmap to the head residual position of the alpha ' vector, arranging the residual elements of the alpha vector after deleting the elements which are the same as the element value beta to the subsequent position of the alpha ' vector, and storing the alpha ' vector according to the ascending sequence of the line values of the alpha ' vector; the calculation operation specifically includes: the face recognition terminal extracts an alpha 'vector and a row vector corresponding to input data and the alpha' vector, adds element values of which bitmap is 1 in the row vector and then multiplies the added element values by a head position value of the alpha 'vector to obtain a product result, multiplies elements of the rest position of the row vector by corresponding element values of the rest position of the alpha' vector to obtain a product result, adds all the product results to obtain a full-connection operation result, performs storage operation and calculation operation on the input data and weight data to obtain a matrix multiplication result, and performs verification according to the matrix multiplication result; n is an integer greater than or equal to 1, and n is the column value of the weight data.
5. The terminal of claim 4,
the processing unit is specifically configured to perform region segmentation on the target face image to obtain a target face region, where the target face region is a region image that is only a face; carrying out binarization processing on the target face area to obtain a binarization face image; dividing the binaryzation face image into a plurality of regions, wherein the areas of the regions are the same and the area size is larger than a preset area value; extracting feature points of the binarized face image to obtain a plurality of feature points; determining the distribution density of the characteristic points corresponding to each of the plurality of areas according to the plurality of characteristic points to obtain a plurality of distribution densities of the characteristic points; determining a target mean square error according to the distribution densities of the plurality of feature points; determining a target quality evaluation value corresponding to the target mean square error according to a preset mapping relation between the mean square error and the quality evaluation value; when the target quality evaluation value is smaller than the preset quality evaluation value, performing image enhancement processing on the target face image, and matching the target face image subjected to the image enhancement processing with a preset face template to obtain a matching value; and when the matching value is larger than a preset threshold value, determining that the target face image is verified to be passed.
CN202010724616.9A 2020-07-24 2020-07-24 Data storage method and system of face recognition terminal Active CN111881813B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010724616.9A CN111881813B (en) 2020-07-24 2020-07-24 Data storage method and system of face recognition terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010724616.9A CN111881813B (en) 2020-07-24 2020-07-24 Data storage method and system of face recognition terminal

Publications (2)

Publication Number Publication Date
CN111881813A CN111881813A (en) 2020-11-03
CN111881813B true CN111881813B (en) 2021-02-19

Family

ID=73201624

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010724616.9A Active CN111881813B (en) 2020-07-24 2020-07-24 Data storage method and system of face recognition terminal

Country Status (1)

Country Link
CN (1) CN111881813B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112418996A (en) * 2020-11-30 2021-02-26 珠海采筑电子商务有限公司 Recommendation method and system for elevator suppliers
CN113344092B (en) * 2021-06-18 2022-10-11 中科迈航信息技术有限公司 AI image recognition method and terminal device
CN113628095B (en) * 2021-08-04 2022-11-01 展讯通信(上海)有限公司 Portrait area grid point information storage method and related product

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106548165A (en) * 2016-11-28 2017-03-29 中通服公众信息产业股份有限公司 A kind of face identification method of the convolutional neural networks weighted based on image block
CN106959937A (en) * 2017-03-30 2017-07-18 中国人民解放军国防科学技术大学 A kind of vectorization implementation method of warp product matrix towards GPDSP
CN108090440A (en) * 2017-12-14 2018-05-29 中国铁道科学研究院电子计算技术研究所 A kind of authentication system towards railway transport of passengers
CN108228696A (en) * 2017-08-31 2018-06-29 深圳市商汤科技有限公司 Research on face image retrieval and system, filming apparatus, computer storage media
CN109558798A (en) * 2018-10-23 2019-04-02 广东工业大学 One kind being based on the matched face identification method of convolution characteristic pattern and system
CN110084739A (en) * 2019-03-28 2019-08-02 东南大学 A kind of parallel acceleration system of FPGA of the picture quality enhancement algorithm based on CNN
CN110263670A (en) * 2019-05-30 2019-09-20 湖南城市学院 A kind of face Local Features Analysis system
CN110309912A (en) * 2018-03-27 2019-10-08 北京深鉴智能科技有限公司 Data access method, hardware accelerator, calculates equipment, storage medium at device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9306966B2 (en) * 2001-12-14 2016-04-05 The Trustees Of Columbia University In The City Of New York Methods of unsupervised anomaly detection using a geometric framework
CN108197587B (en) * 2018-01-18 2021-08-03 中科视拓(北京)科技有限公司 Method for performing multi-mode face recognition through face depth prediction
CN111027504A (en) * 2019-12-18 2020-04-17 上海眼控科技股份有限公司 Face key point detection method, device, equipment and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106548165A (en) * 2016-11-28 2017-03-29 中通服公众信息产业股份有限公司 A kind of face identification method of the convolutional neural networks weighted based on image block
CN106959937A (en) * 2017-03-30 2017-07-18 中国人民解放军国防科学技术大学 A kind of vectorization implementation method of warp product matrix towards GPDSP
CN108228696A (en) * 2017-08-31 2018-06-29 深圳市商汤科技有限公司 Research on face image retrieval and system, filming apparatus, computer storage media
CN108090440A (en) * 2017-12-14 2018-05-29 中国铁道科学研究院电子计算技术研究所 A kind of authentication system towards railway transport of passengers
CN110309912A (en) * 2018-03-27 2019-10-08 北京深鉴智能科技有限公司 Data access method, hardware accelerator, calculates equipment, storage medium at device
CN109558798A (en) * 2018-10-23 2019-04-02 广东工业大学 One kind being based on the matched face identification method of convolution characteristic pattern and system
CN110084739A (en) * 2019-03-28 2019-08-02 东南大学 A kind of parallel acceleration system of FPGA of the picture quality enhancement algorithm based on CNN
CN110263670A (en) * 2019-05-30 2019-09-20 湖南城市学院 A kind of face Local Features Analysis system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
特征保持的图像变换研究;朱薇;《万方数据库》;20130705;全文 *

Also Published As

Publication number Publication date
CN111881813A (en) 2020-11-03

Similar Documents

Publication Publication Date Title
CN111881813B (en) Data storage method and system of face recognition terminal
CN109284684B (en) Information processing method and device and computer storage medium
CN106919918B (en) Face tracking method and device
CN110706179B (en) Image processing method and electronic equipment
US20150294516A1 (en) Electronic device with security module
CN108875643B (en) Fingerprint module, fingerprint identification method and device, storage medium and mobile terminal
CN108537283A (en) A kind of image classification method and convolutional neural networks generation method
US10395095B2 (en) Face model matrix training method and apparatus, and storage medium
CN107909016A (en) A kind of convolutional neural networks generation method and the recognition methods of car system
CN110191303B (en) Video call method, device and apparatus based on screen sound production and computer readable storage medium
CN111209377B (en) Text processing method, device, equipment and medium based on deep learning
CN112464931B (en) Text detection method, model training method and related equipment
CN110688973A (en) Equipment control method and related product
CN111599460A (en) Telemedicine method and system
CN112329926A (en) Quality improvement method and system for intelligent robot
CN110188666B (en) Vein collection method and related products
CN108763350A (en) Text data processing method, device, storage medium and terminal
CN111984884A (en) Non-contact data acquisition method and device for large database
CN111880670B (en) Data processing method and system for intelligent wearable equipment in mobile phone
CN110796673B (en) Image segmentation method and related product
CN110162264B (en) Application processing method and related product
CN108549702B (en) Method for cleaning picture library of mobile terminal and mobile terminal
CN111260697A (en) Target object identification method, system, device and medium
CN112435671B (en) Intelligent voice control method and system for accurately recognizing Chinese
CN111930826A (en) Order generation method and system of software interface

Legal Events

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