A method and device for identifying a person
By analyzing the clothing characteristics of the picture in the neural network model and matching it with multiple preset clothing feature groups, the problem of low recognition accuracy after changing clothes is solved, and the accurate recognition of the target person is achieved.
Patent Information
- Application Number
- CN201911400680.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-12-30
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2039-12-30
AI Technical Summary
In the prior art, after the target person changes clothes, the recognition accuracy rate drops sharply, and the target person cannot be accurately identified.
By obtaining a picture, inputting it into a pre-trained neural network model, clothing features are obtained, and matching clothing features are determined in multiple preset clothing feature groups, matching degrees are calculated, and target characters are determined.
Even if the target person changes clothes, the target person can be accurately identified through matching clothing characteristics and weight calculation, which improves the recognition accuracy.
Smart Images

Figure CN113128265B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer vision technology, and in particular to a method and device for character recognition. Background Art
[0002] In the prior art, when the face in an image or video sequence is blurred and the target person cannot be recognized simply by the face, auxiliary recognition can be performed based on the target person's clothing features, which greatly improves the accuracy and efficiency of recognition.
[0003] However, when the target person changes clothes, the recognition accuracy will drop sharply and the target person cannot be accurately identified. Summary of the invention
[0004] The present application provides a person recognition method and device, which can solve the problem of low recognition accuracy when the target person changes clothes.
[0005] In order to achieve the above purpose, this application adopts the following technical solutions:
[0006] In the first aspect, the present application provides a method for character recognition. Specifically, after acquiring a first picture, a character recognition device inputs the first picture into a pre-trained neural network model to obtain a first clothing feature. Afterwards, the character recognition device determines a matching clothing feature (a clothing feature with the highest similarity with the first clothing feature in the current preset clothing feature group) in the clothing features of each preset clothing feature group of N (N is an integer greater than or equal to 2) preset clothing feature groups. The clothing features in each preset clothing feature group in the present application include clothing features of a person within a preset time period, and the N preset clothing feature groups correspond one-to-one to N different people. After determining the matching clothing feature, the character recognition device determines the weight of the first clothing feature (the weight is used to indicate the degree of difference between the first clothing feature and other clothing features, wherein the greater the degree of difference, the greater the value of the weight of the first clothing feature), and calculates N matching degrees according to the weight of the first clothing feature and all the determined matching clothing features, and the N matching degrees correspond one-to-one to the N preset clothing feature groups. Finally, the person recognition device determines the highest matching degree among the N matching degrees as the target matching degree, and determines the person corresponding to the target clothing feature group (the target clothing feature group is the clothing feature group corresponding to the target matching degree among the N preset clothing feature groups) as the target person.
[0007] The person recognition device determines the target matching degree according to the weight of the first clothing feature, the first clothing feature and the N preset clothing feature groups, and then determines the target person according to the target matching degree. The N preset clothing feature groups correspond to N different persons one by one, so even if the user changes clothes, the person recognition device can accurately recognize the person.
[0008] In a possible design, the first picture is taken in real time, or is selected from stored pictures.
[0009] In practical applications, there are many ways for the person recognition device to obtain the first image, and this application does not limit this.
[0010] In another possible design, the person recognition device displays information of the target person. Here, the information of the target person is characteristic information of the target person, and the characteristic information includes identity information, or includes identity information and geographic location information. Alternatively, the information of the target person is a second picture, and the second picture includes matching clothing features corresponding to the target matching degree.
[0011] In another possible design manner, the first clothing feature includes: a top, pants, a skirt, shoes, socks, a bag, a hat or a scarf.
[0012] In another possible design, the person recognition device may also obtain at least two pictures including people, and input the obtained at least two pictures including people into a pre-trained neural network model to obtain clothing features of each of the at least two pictures including people. Afterwards, the person recognition device divides all the obtained clothing features according to the person to obtain N preset clothing feature groups.
[0013] The person recognition device uses a pre-trained neural network model to process at least two pictures including people, and obtains clothing features in each picture including people. In practical applications, for the trained neural network model, the function of the neural network model is relatively stable. Therefore, the pre-trained neural network model in the present application determines the clothing features in the pictures including people with high accuracy. The person recognition device divides the acquired clothing features according to the granularity of the person to obtain N preset clothing feature groups. These N preset clothing feature groups provide a basis for the person recognition device to identify pictures with blurred faces.
[0014] In another possible design, the pre-trained neural network model in the present application is used to obtain clothing features of the person in the input image based on the input image.
[0015] In another possible design, the pre-trained neural network model in the present application is also used to determine the weights of the obtained clothing features.
[0016] In another possible design, the above-mentioned method of "the person recognition device determines the weight of the first clothing feature" includes: the person recognition device inputs the first image into a pre-trained neural network model to obtain the weight of the first clothing feature.
[0017] In another possible design, the person recognition device obtains the weight of the first clothing feature input by the user, so that the person recognition device can determine the weight of the first clothing feature.
[0018] In a second aspect, the present application provides a person recognition device, which includes a storage unit, an acquisition unit, a processing unit, a determination unit, and a calculation unit.
[0019] Specifically, the storage unit is used to store a pre-trained neural network model. The acquisition unit is used to acquire a first image. The processing unit is used to input the first image acquired by the acquisition unit into the pre-trained neural network model stored in the storage unit to obtain a first clothing feature. The determination unit is used to determine a matching clothing feature in the clothing features of each preset clothing feature group of N preset clothing feature groups; the matching clothing feature is the clothing feature with the highest similarity between the current preset clothing feature group and the first clothing feature obtained by the processing unit; the clothing features in each preset clothing feature group include clothing features of a person in a preset time period, N is an integer greater than or equal to 2, and the N preset clothing feature groups correspond to N different people one by one. The determination unit is also used to determine the weight of the first clothing feature, and the weight is used to indicate the degree of difference between the first clothing feature and other clothing features. The greater the degree of difference, the greater the value of the weight of the first clothing feature. The calculation unit calculates N matching degrees according to the weight of the first clothing feature determined by the determination unit and all the matching clothing features determined, and the N matching degrees correspond to the N preset clothing feature groups one by one. The determination unit is further used to determine the matching degree with the highest value among the N matching degrees calculated by the calculation unit as the target matching degree, and to determine the person corresponding to the target clothing feature group as the target person, and the target clothing feature group is the clothing feature group corresponding to the target matching degree among the N preset clothing feature groups.
[0020] Optionally, the first picture is taken in real time, or is selected from stored pictures.
[0021] Optionally, the first clothing feature includes: a top, pants, a skirt, shoes, socks, a bag, a hat or a scarf.
[0022] Optionally, the acquisition unit is further used to acquire at least two pictures including people. The processing unit is further used to input the at least two pictures including people acquired by the acquisition unit into a pre-trained neural network model to obtain clothing features of each of the at least two pictures including people; and to divide all the obtained clothing features according to the people to obtain N preset clothing feature groups.
[0023] Optionally, a pre-trained neural network model is used to obtain clothing features of a person in the input image based on the input image.
[0024] Optionally, a pre-trained neural network model is also used to determine the weights of the obtained clothing features.
[0025] Optionally, the above-mentioned determination unit is specifically used to: after inputting the first image into a pre-trained neural network model, obtain the weight of the first clothing feature.
[0026] Optionally, the above-mentioned determination unit is specifically used to: determine the weight of the first clothing feature input by the user.
[0027] In a third aspect, the present application provides a person recognition device, the person recognition device comprising a memory and a processor. The memory and the processor are coupled. The memory is used to store a computer program code, the computer program code comprising a computer instruction. When the processor executes the computer instruction, the person recognition device performs the person recognition method as described in the first aspect and any possible design thereof.
[0028] In a fourth aspect, the present application provides a chip system, which is applied to an electronic device; the chip system includes one or more interface circuits and one or more processors. The interface circuit and the processor are interconnected through a line; the interface circuit is used to receive a signal from the memory of the electronic device and send the signal to the processor, wherein the signal includes a computer instruction stored in the memory. When the processor executes the computer instruction, the electronic device executes the person recognition method as described in the first aspect and any possible design thereof.
[0029] In a fifth aspect, the present application provides a computer-readable storage medium, which includes computer instructions. When the computer instructions are executed on a person recognition device, the person recognition device executes the person recognition method as described in the first aspect and any possible design thereof.
[0030] In a sixth aspect, the present application provides a computer program product, which includes computer instructions. When the computer instructions are executed on a person recognition device, the person recognition device executes the person recognition method as described in the first aspect and any possible design thereof.
[0031] For the specific description of the second to sixth aspects and their various implementations in the present application, reference may be made to the detailed description in the first aspect and its various implementations; and for the beneficial effects of the second to sixth aspects and their various implementations, reference may be made to the beneficial effects analysis in the first aspect and its various implementations, which will not be repeated here.
[0032] These and other aspects of the present application will become more apparent from the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 This is a schematic diagram of the hardware structure of a mobile phone in an embodiment of the present application;
[0034] Figure 2 A schematic diagram of the software structure of a mobile phone in an embodiment of the present application;
[0035] Figure 3 The process diagram of the person recognition method in the embodiment of the present application is as follows Figure 1 ;
[0036] Figure 4 A schematic diagram of the structure of a neural network model in an embodiment of the present application;
[0037] Figure 5 This is a schematic diagram of the process of processing an image by a neural network model in an embodiment of the present application;
[0038] Figure 6 Another structural diagram of a neural network model in an embodiment of the present application;
[0039] Figure 7 The process diagram of the person recognition method in the embodiment of the present application is as follows Figure 2 ;
[0040] Figure 8 The process diagram of the person recognition method in the embodiment of the present application is as follows Figure 3 ;
[0041] Fig. 9 The principle framework for generating N preset clothing feature groups in the embodiment of the present application Figure 1 ;
[0042] Fig.10 The principle framework for generating N preset clothing feature groups in the embodiment of the present application Figure 2 ;
[0043] Fig.11 A schematic diagram of an application scenario in which the person recognition method provided in the embodiment of the present application is applicable Figure 1 ;
[0044] Fig.12 A schematic diagram of an application scenario in which the person recognition method provided in the embodiment of the present application is applicable Figure 2 ;
[0045] Fig.13 A schematic diagram of a structure of an application scenario applicable to the person recognition system provided in the embodiment of the present application Figure 3 ;
[0046] Fig.14 This is a schematic diagram of the structure of a person recognition device in an embodiment of the present application;
[0047] Fig.15 This is a schematic diagram of the structure of the chip system in the embodiment of the present application;
[0048] Fig.16 It is a schematic diagram of the structure of the computer program product in the embodiment of the present application. DETAILED DESCRIPTION
[0049] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this embodiment, unless otherwise specified, "plurality" means two or more.
[0050] With the increasing development of computer technology, person detection has become an important hot issue in the field of computer vision. Person detection has broad application prospects in the fields of assisted driving, long-distance identity recognition, unmanned supermarkets, target person tracking, crime prevention, searching for lost elderly people and children, and target person activity analysis.
[0051] The so-called person detection refers to determining whether there is a person in an image or video sequence, and if so, accurately locating the position and area of the person in the video image, and even more, determining the identity information of the person. The person here can refer to a person who is active or stationary in an image (which can be an image in a video sequence).
[0052] Generally, a person recognition device uses face recognition technology to determine the identity information of a person. When the face in an image or video sequence is blurred and the target person cannot be recognized simply by the face, the person recognition device can assist in recognition based on the clothing features of the target person, greatly improving the accuracy and efficiency of recognition. However, when the target person changes clothes, the recognition accuracy will drop sharply and the target person cannot be accurately recognized.
[0053] To this end, the present application provides a person recognition method and device, which can be applied to the process of a user querying information about a person in a first picture. Specifically, it can be applied to the process of identifying a target person in the first picture according to a plurality of preset clothing feature groups after acquiring the first picture.
[0054] In the embodiment of the present application, the preset clothing feature group may include multiple clothing features, which are clothing features of a character within a preset time period. The clothing features represent the clothing worn by the character, such as: tops, pants, skirts, shoes, socks, bags, hats, scarves, etc.
[0055] The person identification device in the embodiment of the present application may be a terminal. Specifically, the terminal may be a portable device such as a mobile phone, a tablet computer, a wearable electronic device, or a vehicle-mounted device, an intelligent robot, or a personal computer (PC), a personal digital assistant (PDA), a netbook, or other devices. In addition, the person identification device in the embodiment of the present application may also be a server.
[0056] When the above-mentioned person recognition device is a terminal, the person recognition method can be implemented by an application for recognizing a person installed on the terminal.
[0057] The above-mentioned application for identifying a person may be an embedded application installed in the terminal (i.e., a system application of the terminal) or a downloadable application. Among them, an embedded application is an application provided as a part of the implementation of a terminal (such as a mobile phone). A downloadable application is an application that can provide its own Internet protocol multimedia subsystem (IMS) connection, and the downloadable application is an application that can be pre-installed in the terminal or a third-party application that can be downloaded and installed in the terminal by a user.
[0058] Please refer to Figure 1 , taking the case where the person recognition device is a mobile phone, Figure 1 Figure 1 shows a hardware structure of a mobile phone. Figure 1 As shown, the mobile phone may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc.
[0059] Among them, the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0060] It is to be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the mobile phone. In other embodiments of the present application, the mobile phone may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0061] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0062] The controller can be the nerve center and command center of the mobile phone. The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of fetching and executing instructions.
[0063] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0064] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0065] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). The I2S interface can be used for audio communication. The PCM interface can also be used for audio communication to sample, quantize and encode analog signals. The UART interface is a universal serial data bus for asynchronous communication. The bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. The MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc. The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. The USB interface 130 is an interface that complies with the USB standard specification, and can specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge a mobile phone, and can also be used to transmit data between a mobile phone and peripheral devices. It can also be used to connect headphones and play audio through them. This interface can also be used to connect other electronic devices, such as AR devices.
[0066] It is understandable that the interface connection relationship between the modules illustrated in the embodiments of the present application is only a schematic illustration and does not constitute a structural limitation on the mobile phone. In other embodiments of the present application, the mobile phone may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0067] The charging management module 140 is used to receive charging input from a charger. The charger can be a wireless charger or a wired charger. The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and provides power to the processor 110, the internal memory 121, the external memory, the display 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc.
[0068] The wireless communication function of the mobile phone can be realized through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor.
[0069] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the mobile phone can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0070] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied on mobile phones. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, filter, amplify and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110. The modulation and demodulation processor may include a modulator and a demodulator.
[0071] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), GNSS, frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to mobile phones. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the electromagnetic wave signal and filters it, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0072] Exemplarily, the GNSS in the embodiments of the present application may include: GPS, GLONASS, BDS, QZSS, SBAS, and / or GALILEO, etc.
[0073] The mobile phone implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information. The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel.
[0074] The mobile phone can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor. ISP is used to process the data fed back by camera 193. Camera 193 is used to obtain static images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The digital signal processor is used to process digital signals. In addition to processing digital image signals, it can also process other digital signals. The video codec is used to compress or decompress digital videos.
[0075] NPU is a neural network (NN) computing processor. It can quickly process input information and continuously self-learn by drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain. NPU can realize applications such as intelligent cognition of mobile phones, such as image recognition, face recognition, voice recognition, text understanding, etc.
[0076] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the mobile phone. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music and videos can be stored in the external memory card.
[0077] The internal memory 121 may be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the mobile phone by running the instructions stored in the internal memory 121 .
[0078] The mobile phone can realize audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor.
[0079] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The speaker 170A, also known as the "speaker", is used to convert audio electrical signals into sound signals. The receiver 170B, also known as the "earpiece", is used to convert audio electrical signals into sound signals. The microphone 170C, also known as the "microphone" or "microphone", is used to convert sound signals into electrical signals. The headphone jack 170D is used to connect wired headphones. The headphone jack 170D can be a USB interface 130, or it can be a 3.2mm open mobile terminal platform (OMTP) standard interface, or a cellular telecommunications industry association of the USA (CTIA) standard interface.
[0080] The button 190 includes a power button, a volume button, etc. The button 190 can be a mechanical button. It can also be a touch button. The mobile phone can receive the button input and generate a key signal input related to the user settings and function control of the mobile phone. The motor 191 can generate a vibration prompt. The motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. The indicator 192 can be an indicator light, which can be used to indicate the charging status, power changes, messages, missed calls, notifications, etc. The SIM card interface 195 is used to connect the SIM card. The SIM card can be inserted into the SIM card interface 195, or pulled out from the SIM card interface 195 to achieve contact and separation with the mobile phone. The mobile phone can support 1 or N SIM card interfaces, N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM card, Micro SIM card, SIM card, etc.
[0081] The software system of the mobile phone can adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present application takes the Android system of the layered architecture as an example to illustrate the software structure of the mobile phone.
[0082] Figure 2 It is a software structure block diagram of the mobile phone of the embodiment of the present application.
[0083] The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: application layer, application framework layer, Android runtime and system library, and kernel layer.
[0084] The application layer can include a series of application packages.
[0085] like Figure 2 As shown, the application package may include camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message and other applications.
[0086] The application framework layer provides an application programming interface (API) and a programming framework for applications in the application layer.
[0087] The application framework layer includes some predefined functions.
[0088] like Figure 2 As shown, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.
[0089] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.
[0090] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
[0091] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.
[0092] The phone manager is used to provide the communication functions of the mobile phone, such as the management of call status (including answering, hanging up, etc.).
[0093] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
[0094] The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc.
[0095] Android Runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system.
[0096] The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.
[0097] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
[0098] The system library may include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.
[0099] The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.
[0100] The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
[0101] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0102] A 2D graphics engine is a drawing engine for 2D drawings.
[0103] The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.
[0104] The following is an example of the workflow of the mobile phone software and hardware, combined with the capture and photo scene.
[0105] When the touch sensor 180K receives a touch operation, the corresponding hardware interrupt is sent to the kernel layer. The kernel layer processes the touch operation into a raw input event (including touch coordinates, timestamp of the touch operation, and other information). The raw input event is stored in the kernel layer. The application framework layer obtains the raw input event from the kernel layer and identifies the control corresponding to the input event. For example, if the touch operation is a touch single-click operation and the control corresponding to the single-click operation is the control of the camera application icon, the camera application calls the interface of the application framework layer to start the camera application, and then starts the camera driver by calling the kernel layer to capture static images or videos through the camera 193.
[0106] The following describes the person recognition method provided in the embodiment of the present application in conjunction with the accompanying drawings.
[0107] Figure 3 FIG. 1 is a flow chart of a method for identifying a person provided in an embodiment of the present application. Figure 3 As shown, the person recognition method provided in the embodiment of the present application includes:
[0108] S300: Acquire a first picture.
[0109] The first picture may be taken by a camera in real time, or may be selected from stored pictures. Here, the stored pictures may include: pictures downloaded from a network server, pictures transmitted by other devices (such as Bluetooth transmission), pictures transmitted by social applications, pictures taken by screenshots, etc., which are not limited in the present embodiment.
[0110] S301, inputting the first picture into a pre-trained neural network model to obtain a first clothing feature.
[0111] The pre-trained neural network model is used to obtain the clothing features of the person in the input image based on the input image.
[0112] The pre-trained neural network model in the embodiment of the present application may be a deep neural network. A deep neural network has excellent feature learning capabilities, and the learned features have a more essential characterization of the data, which is conducive to visualization or classification.
[0113] Deep neural networks generally include multiple network layers (such as convolutional layers, fully connected layers, etc.). The multi-layer structure of deep neural networks can automatically learn features, and can learn features at multiple levels: shallower convolutional layers have smaller receptive domains and learn features of some local areas; deeper convolutional layers have larger receptive domains and can learn more abstract features.
[0114] Exemplarily, the pre-trained neural network model in the embodiment of the present application can be a convolutional neural network (CNN) model represented by a ResNet structure, or it can be other deep neural network models, which is not limited in the embodiment of the present application.
[0115] In one example, the pre-trained neural network model includes a convolution module, a region proposal network (RPN) module, a position determination module, and a feature determination module. The convolution module includes multiple convolution layers, the shallower convolution layer has a smaller perception domain and can learn the features of some local regions (corresponding to small targets (such as objects of 10 pixels to 90 pixels)); the deeper convolution layer has a larger perception domain and can learn the features of more abstract regions (corresponding to large targets (such as objects including 96 pixels)). The candidate region network module includes a first RPN and a second RPN, wherein the first RPN is used to determine the candidate region (region proposal) of the large target, and the second RPN is used to determine the candidate region of the small target. The position determination module includes multiple convolution layers and a fully connected layer, which are used to determine the position information of the clothing features in the picture. The feature determination module includes multiple convolution layers and a fully connected layer, which are used to determine the clothing features in the picture. Clothing features may include style, pattern, color, etc., which are not limited in the embodiments of the present application.
[0116] After obtaining the first picture, the first picture is input into a pre-trained neural network model. Multiple feature maps are obtained from different layers of the convolution module, and the multiple feature maps are processed by the RPN module to obtain a first candidate area and a second candidate area. Among them, the first candidate area corresponds to a large target in the first picture, and the second candidate area corresponds to a small target in the first picture. Afterwards, the first candidate area and the second candidate area are processed by a position determination module to determine the position information of the clothing feature in the first picture, and the position information can be represented by a rectangular coordinate frame. Then, the determined position information is processed by a feature determination module to determine the first clothing feature. It can be understood that the first clothing feature is a clothing feature in the first picture. The first clothing feature in the embodiment of the present application includes: a top, pants, a skirt, shoes, socks, a bag, a hat or a scarf.
[0117] For example, Figure 4 The process of using a pre-trained neural network model to perform image detection on the first picture to determine the first clothing feature is shown. Figure 4 The convolution module in includes the 1st convolution layer, the 2nd convolution layer, the 3rd convolution layer, the 4th convolution layer, etc. After the first image is input into the pre-trained neural network model, the feature map of the small target is obtained from the 3rd convolution layer, and the feature map of the large target is obtained from the 4th convolution layer. After that, the feature map of the large target is input into the first RPN to obtain the first candidate area and the candidate context area. The first candidate area is the area including the large target, and the candidate context area is used to assist in determining the area including the small target; the feature map of the small target and the candidate context area are input into the second RPN to obtain the second candidate area. The second candidate area is the area including the small target. Then, the first candidate area and the second candidate area are processed by the position determination module to obtain the position information representing the clothing feature in the first image (generally a bounding box is used to represent the position information). Finally, the determined position information is processed by the feature determination module to determine the first clothing feature.
[0118] Combined with the above Figure 4 ,like Figure 5 As shown, Figure 5 The picture a in the figure is a picture of person AA. After inputting the picture a into the pre-trained neural network model, the position information of "top", "skirt, socks" (clothing features of the person's legs), "shoes", and "bag" in the picture a is obtained ( Figure 6 , a rectangular box is used to represent the position information). Afterwards, the determined position information is processed by a feature determination module to determine the features of the top worn by person AA, the features of the skirt and socks worn by person AA, the features of the shoes worn by person AA, and the features of the bag carried by person AA.
[0119] S302: Determine matching clothing features among clothing features of each preset clothing feature group of N (N is an integer greater than or equal to 2) preset clothing feature groups.
[0120] The matching clothing feature is the clothing feature in the currently preset clothing feature group that has the highest similarity with the first clothing feature.
[0121] In the embodiment of the present application, the clothing features of each preset clothing feature group include clothing features of a person within a preset time period, and N preset clothing feature groups correspond one-to-one to N different people.
[0122] Specifically, for the current preset clothing feature group, the similarity between each clothing feature in the current preset clothing feature group and the first clothing feature is calculated, and the clothing feature with the highest similarity is determined (the clothing feature is the matching clothing feature in the current preset clothing feature group).
[0123] The calculation of the above similarity can be achieved by calculating the Hamming distance, cosine distance, Euler distance or asymmetric distance between the clothing features, etc., which is not limited in the embodiments of the present application.
[0124] Generally, for two clothing features, the higher the similarity value, the closer the contents represented by the two clothing features are to each other, or the smaller the distance between the two clothing features. Therefore, it can be considered that: in a certain preset clothing feature group, the clothing feature with the highest similarity to the first clothing feature (i.e., the matching clothing feature) has the smallest distance to the first clothing feature.
[0125] S303: Determine the weight of the first clothing feature.
[0126] In the embodiment of the present application, the weight of a certain clothing feature is used to indicate the degree of difference between the clothing feature and other clothing features. The greater the degree of difference, the greater the value of the weight of the clothing feature. Correspondingly, the smaller the degree of difference, the smaller the value of the weight of the clothing feature.
[0127] For example, for a top with a unique pattern and style, the top is quite different from other clothes, so the weight value representing the clothing characteristics of the top is relatively large. For a top with a more popular pattern and style, the top is less different from other clothes, so the weight value representing the clothing characteristics of the top is relatively small. Since a fluorescent green duckbill cap is easy to distinguish from other hats, the weight value representing the clothing characteristics of the fluorescent green duckbill cap is relatively large.
[0128] The weight of the first clothing feature may be determined by the following method 1 or method 2.
[0129] Method 1: Use a pre-trained neural network model to determine the weight of the first clothing feature.
[0130] Combined with the above Figure 4 ,like Figure 6 As shown, in addition to the above-mentioned convolution module, RPN module, position determination module and feature determination module, the pre-trained neural network model in the embodiment of the present application may also include a weight learning module. The weight learning module is used to determine the weight of each clothing feature.
[0131] After the first clothing feature is determined, the first clothing feature is input into a weight learning module to determine a weight of the first clothing feature.
[0132] Method 2: Obtain the weight of the first clothing feature input by the user.
[0133] For example, a public security officer inputs a picture of a person wearing a fluorescent green baseball cap and inputs the weight of the baseball cap. Then, the weight representing the clothing feature of the baseball cap can be determined based on the public security officer's operation.
[0134] In the embodiment of the present application, S302 may be executed first and then S303; S303 may be executed first and then S302; S302 and S303 may also be executed simultaneously, which is not limited in the embodiment of the present application.
[0135] S304: Calculate N matching degrees according to the weight of the first clothing feature and all determined matching clothing features.
[0136] The N matching degrees correspond one-to-one to the N preset clothing feature groups.
[0137] Since the matching clothing feature is the clothing feature with the highest similarity to the first clothing feature in the currently preset clothing feature group, when determining the matching clothing feature in the currently preset clothing feature group, the similarity between the matching clothing feature and the first clothing feature can be determined.
[0138] Subsequently, the matching degree of the current preset clothing feature group is calculated based on the "similarity between the matching clothing feature in the current preset clothing feature group and the first clothing feature" and the weight of the first clothing feature. Since there are N preset clothing feature groups, N matching degrees can be determined.
[0139] Exemplarily, if the first clothing feature includes clothing feature i and clothing feature j, and clothing feature i and clothing feature j are different. The weight of clothing feature i is weight 1, and the weight of clothing feature j is weight 2. In the preset clothing feature group 1, the clothing feature with the highest similarity to clothing feature i is clothing feature a, and the similarity between the two is similarity 1; the clothing feature with the highest similarity to clothing feature j is clothing feature b, and the similarity between the two is similarity 2. The formula: weight 1*similarity 1+weight 2*similarity 2 can be used to calculate the matching degree corresponding to the clothing feature group 1. Of course, other formulas can also be used to calculate the matching degree, and the embodiments of the present application are not limited to this.
[0140] S305: Determine the matching degree with the highest value among the N matching degrees as the target matching degree.
[0141] S306: Determine the person corresponding to the target clothing feature group as the target person, where the target clothing feature group is a clothing feature group corresponding to the target matching degree among the N preset clothing feature groups.
[0142] The N preset clothing feature groups correspond to the N different characters one by one. The target character in the first picture is determined based on the N preset clothing feature groups, thereby improving the accuracy of character recognition.
[0143] Since the N clothing feature groups are preset, the person recognition method provided in the embodiment of the present application further obtains N preset clothing feature groups before S302.
[0144] Combined with the above Figure 3 ,like Figure 7 As shown, the person recognition method provided in the embodiment of the present application further includes S700 before S302.
[0145] S700: Obtain N preset clothing feature groups.
[0146] In the embodiment of the present application, S300 and S301 may be executed first, and then S700; S700 may be executed first, and then S300 and S301; S300, S301 and S700 may also be executed simultaneously, which is not limited in the embodiment of the present application.
[0147] In one implementation, the method for obtaining N preset clothing feature groups is: receiving N preset clothing feature groups sent from other devices, and subsequently storing the N preset clothing feature groups. In this way, when it is necessary to determine the target person in the first picture, the N preset clothing feature groups are directly obtained locally.
[0148] In another implementation, combining Figure 7 ,like Figure 8 As shown, S700 may include S71 to S73.
[0149] S71. Obtain at least two pictures including people.
[0150] Optionally, obtain at least two pictures including people from the gallery.
[0151] For example, in a criminal investigation scenario, the gallery includes pictures of people that the public security agency pays special attention to. In a shopping mall management application scenario, the gallery includes pictures of every member in the mall.
[0152] The gallery may include pictures with clear faces, or pictures with "identity information of people in the attribute information", which is not limited in the embodiments of the present application. The identity information of a person is used to identify a person. The identity information may include but is not limited to appearance information, annotation information, or other identified feature information. The expression form of identity information may include text, serial number, character number, or other information related to individual characteristics.
[0153] For a picture with a person's identity information in its attribute information, the person's identity information may be information manually added by a user.
[0154] Specifically, the following method can be used to obtain pictures containing people in the picture library:
[0155] Method 1: Using face recognition technology, identify pictures containing people and determine the people in the pictures.
[0156] It is understandable that, for pictures with clear faces in the gallery, the first method can identify the person in the picture.
[0157] Method 2: According to the attribute information of the picture, the picture including the person is identified, and the person in the picture is determined.
[0158] If the attribute information of the picture includes the identity information of the person, the person in the picture can be determined based on the attribute information.
[0159] S72. Input at least two pictures including people into a pre-trained neural network model to obtain clothing features of each of the at least two pictures including people.
[0160] S72 may refer to the description of S301 above, which will not be repeated here.
[0161] S73. Divide all the clothing features obtained according to the characters to obtain N preset clothing feature groups.
[0162] As can be seen from the above description, after determining the clothing features in a certain picture, it can be determined that the clothing features correspond to the person.
[0163] After executing S72, the determined clothing features can be divided according to the characters to obtain a plurality of clothing feature groups, and the plurality of clothing feature groups are stored. It can be seen that the plurality of clothing feature groups correspond to a plurality of different characters one by one.
[0164] Exemplarily, N clothing feature groups are obtained, and the N clothing feature groups correspond one-to-one to N different characters.
[0165] For example, Fig. 9As shown, the determined clothing features include: clothing feature a, clothing feature b, clothing feature c, clothing feature d, clothing feature e and clothing feature f. When acquiring clothing features, the attribute information of each clothing feature is acquired. The attribute information of clothing feature a includes person 1, the attribute information of clothing feature b includes person 2, the attribute information of clothing feature c includes person 1, the attribute information of clothing feature d includes person 1, the attribute information of clothing feature e includes person 2, and the attribute information of clothing feature f includes person 3. In other words, clothing feature a, clothing feature c and clothing feature d all correspond to person 1, clothing feature b and clothing feature e all correspond to person 2, and clothing feature f corresponds to person 3. In this way, three clothing feature groups can be obtained: clothing feature group 1 (corresponding to person 1), clothing feature group 2 (corresponding to person 2) and clothing feature group 3 (corresponding to person 3). Clothing feature group 1 includes clothing feature a, clothing feature c, and clothing feature d. Since these three clothing features correspond to person 1, the attribute information of clothing feature group 1 may also include person 1. Clothing feature group 2 includes clothing feature b and clothing feature e. Since the attribute information of clothing feature b and clothing feature e includes person 2, the attribute information of clothing feature group 2 may also include person 2. Clothing feature group 3 includes clothing feature f. Since the attribute information of clothing feature f includes person 3, the attribute information of clothing feature group 3 may also include person 3.
[0166] Optionally, the N clothing feature groups can be further divided according to different clothing features. Fig. 9 ,like Fig.10 As shown, the clothing features in the clothing feature group are divided into three sub-clothing feature groups according to the clothes in the upper garment, the clothes in the leg region, and the shoes. In this way, the stored clothing feature group also includes a plurality of sub-clothing feature groups.
[0167] Optionally, the attribute information of each clothing feature in the embodiment of the present application may also include the wearing time of the clothing shown by the clothing feature, that is, the shooting time of the picture corresponding to the clothing feature. Later, if the user requests to query pictures of the person in the first picture within a certain time period, the result can be searched and determined in combination with the attribute information of each clothing feature.
[0168] Further, if after generating a plurality of clothing feature groups, a picture 101 including person 1 is added to the picture library, S72 is executed to determine clothing features in the picture 101. Thereafter, the determined clothing features are stored in the clothing feature group corresponding to person 1, so as to realize the update of N clothing feature groups.
[0169] In actual applications, users may have the need to query people who wear the clothes in the first picture on a certain day (or for a certain period of time). In this case, in addition to obtaining the first picture, the query date can also be obtained. Accordingly, the person recognition method provided in the embodiment of the present application is: according to the query date and N preset clothing feature groups, matching clothing features are determined in each preset clothing feature group. The attribute information of the matching clothing features includes time information, and the time is within the duration input by the user. In this way, the person finally determined meets the condition of wearing the clothes in the first picture on the query date.
[0170] In addition, users may also need to identify people based on a certain clothing feature (or certain clothing features). For example, a case officer needs to search for people wearing fluorescent green caps, and does not care about other clothing features. In this way, the case officer can set the weight of the clothing feature representing the fluorescent green cap to 1, and the weight of other clothing features to 0.
[0171] The person recognition device in the embodiment of the present application may be a terminal. The above S300 to S306 may be specifically executed by the terminal, and S71 to S73 may also be executed by the terminal.
[0172] The person recognition device in the embodiment of the present application may also be a server. The above S300 to S306 may be specifically executed by the server, and S71 to S73 may also be executed by the server.
[0173] In addition, the person recognition method provided in the embodiment of the present application can also be implemented by the interaction between the terminal and the server. For example, the above S71 to S73 are executed by the server, and the above S300 to S306 are executed by the terminal.
[0174] The following describes the person recognition method provided in the embodiment of the present application in conjunction with specific scenarios.
[0175] In one implementation, the person recognition method provided in the embodiment of the present application is applicable to Fig.11 The application scenario shown in Figure 1. Fig.11 As shown, server A pre-executes S71 to S73 to generate N preset clothing feature groups. The terminal is installed with client A for identifying people, and client A communicates with server A. After the user logs in to the management account of client A, he inputs an operation to identify the target person in the first picture. In response to the operation, client A sends the first picture (i.e. Fig.11 After receiving the first picture (i.e., obtaining the first picture), the server determines the target person (i.e., Fig.11Step b) shown in the figure, and send the target person's information to client A (i.e. Fig.11 In other words, server A executes S300 to S306. Fig.11 In the illustrated scenario, server A executes S71 to S73 and also executes S300 to S306. The first image acquired by server A is the image sent by client A.
[0176] In another implementation, the person recognition method provided in the embodiment of the present application is applicable to Fig.12 The application scenario shown in Figure 1. Fig.12 As shown, server A pre-executes S71 to S73 above to generate N preset clothing feature groups. The terminal is installed with client A for identifying people. In the scenario where client A is installed, the N preset clothing feature groups are then sent from server A to the terminal and stored in the terminal (i.e., the terminal obtains the N preset clothing feature groups). When the clothing features in the N preset clothing feature groups change (such as addition or deletion), client A communicates with server A to timely update the clothing feature groups stored in the terminal. The user enters an operation in client A to identify the target person in the first picture (i.e., Fig.12 After step a), client A determines the target person in the first picture according to the N preset clothing feature groups stored, and outputs (such as displays) the information of the target person (i.e. Fig.12 In other words, the terminal executes the above steps S300 to S306. Fig.12 In the illustrated scenario, server A executes S71 to S73 above, and the terminal executes S300 to S306 above.
[0177] In another implementation, the person recognition method provided in the embodiment of the present application is applicable to Fig.13 The application scenario shown in Figure 1. Fig.13 As shown, server B executes S71 to S73 in advance to generate N preset clothing feature groups. The administrator inputs an operation to query the information of the target person in the first picture in server B (i.e. Fig.13 After step a), server B determines the target person in the first picture according to the N preset clothing feature groups stored, and outputs (such as displays) the information of the target person (i.e. Fig.13 In other words, server B executes the above steps S300 to S306. Fig.13 In the illustrated scenario, server B executes S71 to S73 and also executes S300 to S306. The first image acquired by server B is the image input / selected by the administrator.
[0178] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of the method. In order to realize the above functions, it includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.
[0179] The embodiment of the present application can divide the functional modules of the person recognition device according to the above method example. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical functional division. There may be other division methods in actual implementation.
[0180] like Fig.14 FIG. 1 is a schematic diagram of a structure of a person recognition device provided in an embodiment of the present application. The person recognition device is used to recognize a person in a first image according to clothing features, for example, to perform Figure 3 , Figure 7 or Figure 8 The person recognition device may include an acquisition unit 140 , a processing unit 141 , a storage unit 142 , a determination unit 143 and a calculation unit 144 .
[0181] The storage unit 142 is used to store a pre-trained neural network model. The acquisition unit 140 is used to acquire a first image. The processing unit 141 is used to input the first image acquired by the acquisition unit 140 into the pre-trained neural network model stored in the storage unit 142 to obtain a first clothing feature. The determination unit 143 is used to determine a matching clothing feature in the clothing features of each preset clothing feature group of N preset clothing feature groups; the matching clothing feature is: the clothing feature with the highest similarity between the current preset clothing feature group and the first clothing feature obtained by the processing unit; the clothing features in each preset clothing feature group include clothing features of a person in a preset time period, N is an integer greater than or equal to 2, and the N preset clothing feature groups correspond to N different people one by one. The determination unit 143 is also used to determine the weight of the first clothing feature, and the weight is used to indicate the degree of difference between the first clothing feature and other clothing features. The greater the degree of difference, the greater the value of the weight of the first clothing feature. The calculation unit 144 calculates N matching degrees according to the weight of the first clothing feature determined by the determination unit 143 and all matching clothing features of each preset clothing feature group, and the N matching degrees correspond to the N preset clothing feature groups one by one. The determination unit 143 is further used to determine the matching degree with the highest value among the N matching degrees calculated by the calculation unit 144 as the target matching degree, and to determine the person corresponding to the target clothing feature group as the target person, and the target clothing feature group is the clothing feature group corresponding to the target matching degree among the N preset clothing feature groups.
[0182] For example, combined with Figure 3 The acquisition unit 140 can be used to execute S300, the processing unit 141 can be used to execute S301, the determination unit 143 can be used to execute S302, S303, S305, S306, the storage unit 142 is used to store N preset clothing feature groups. The calculation unit 144 is used to execute S304.
[0183] Optionally, the first picture is taken in real time, or is selected from stored pictures.
[0184] Optionally, the first clothing feature is: a top, pants, a skirt, shoes, socks, a bag, a hat or a scarf.
[0185] Optionally, the acquisition unit 140 is further used to acquire at least two pictures including people. The processing unit 141 is further used to input the at least two pictures including people acquired by the acquisition unit 140 into a pre-trained neural network model to obtain clothing features of each of the at least two pictures including people; and to divide all the obtained clothing features according to the people to obtain N preset clothing feature groups.
[0186] For example, combined with Figure 8 The acquisition unit 140 can be used to execute S71, and the processing unit 141 can be used to execute S72 and S73.
[0187] Optionally, a pre-trained neural network model is used to obtain clothing features of a person in the input image based on the input image.
[0188] Optionally, a pre-trained neural network model is also used to determine the weights of the obtained clothing features.
[0189] Optionally, the determination unit 143 is specifically used to obtain the weight of the first clothing feature after inputting the first image into a pre-trained neural network model.
[0190] As an example, combining Figure 1 The function of the acquisition unit 140 in the person recognition device is similar to Figure 1 The functions of the camera 293, antenna 1 or antenna 2 are the same; the functions implemented by the processing unit 141, the determination unit 144 and the calculation unit 144 are the same as Figure 1 The functions of the processor 214 in the same manner as those of the storage unit 142; Figure 1 The function of the internal memory 221 is the same as that of the internal memory 221 in FIG.
[0191] The explanation of the relevant contents in this embodiment can refer to the above method embodiment, which will not be repeated here.
[0192] The present application also provides a chip system, such as Fig.15 As shown, the chip system includes at least one processor 1501 and at least one interface circuit 1502. The processor 1501 and the interface circuit 1502 can be interconnected through lines. For example, the interface circuit 1502 can be used to receive signals from other devices (such as the memory of the person recognition device). For another example, the interface circuit 1502 can be used to send signals to other devices (such as the processor 1501). Exemplarily, the interface circuit 1502 can read the instructions stored in the memory and send the instructions to the processor 1501. When the instructions are executed by the processor 1501, the person recognition device can execute the various steps in the above embodiments. Of course, the chip system can also include other discrete devices, which are not specifically limited in the embodiments of the present application.
[0193] Another embodiment of the present application further provides a computer-readable storage medium, which stores instructions. When the instructions are executed on an identification device, the identification device executes each step performed by the identification device in the method flow shown in the above method embodiment.
[0194] In some embodiments, the disclosed methods may be implemented as computer program instructions encoded in a machine-readable format on a computer-readable storage medium or on other non-transitory media or articles of manufacture.
[0195] Fig.16 A conceptual partial view of a computer program product provided by an embodiment of the present application is schematically shown, wherein the computer program product includes a computer program for executing a computer process on a computing device.
[0196] In one embodiment, the computer program product is provided using a signal bearing medium 160. The signal bearing medium 160 may include one or more program instructions, which when executed by one or more processors may provide the above-mentioned instructions for FIG. Figure 7 or Figure 8 Thus, for example, reference Figure 8 One or more features of S71-S73, S300-S306 may be undertaken by one or more instructions associated with the signal bearing medium 160. In addition, Fig.16 The program instructions in also describe example instructions.
[0197] In some examples, signal bearing medium 160 may include computer readable medium 161, such as, but not limited to, a hard drive, a compact disk (CD), a digital video disk (DVD), a digital tape, a memory, a read-only memory (ROM), or a random access memory (RAM), and the like.
[0198] In some implementations, signal bearing medium 160 may include computer recordable medium 162 such as, but not limited to, memory, read / write (R / W) CD, R / W DVD, and the like.
[0199] In some implementations, signal bearing medium 160 may include communication medium 163 such as, but not limited to, digital and / or analog communication media (eg, fiber optic cables, waveguides, wired communication links, wireless communication links, etc.).
[0200] The signal bearing medium 160 may be communicated by a wireless form of communication medium 163 (eg, a wireless communication medium conforming to the IEEE 802.11 standard or other transmission protocol). The one or more program instructions may be, for example, computer executable instructions or logic implemented instructions.
[0201] In some examples, the person recognition device described in the embodiments of the present application can be configured to provide various operations, functions, or actions in response to one or more program instructions in computer-readable media 161, computer-recordable media 162, and / or communication media 163.
[0202] It should be understood that the arrangement described here is only for illustrative purposes. Thus, it will be appreciated by those skilled in the art that other arrangements and other elements (e.g., machines, interfaces, functions, sequences, and functional groups, etc.) can be used instead, and some elements can be omitted together according to the desired result. In addition, many of the described elements can be implemented as discrete or distributed components, or in any appropriate combination and position to combine other components to implement functional entities.
[0203] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using a software program, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loading and executing a computer execution instruction on a computer, a process or function according to an embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. Computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server, data center, etc. that contains one or more servers that can be integrated with a medium. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (eg, a solid state disk (SSD)).
[0204] The above is only a specific implementation of the present application. Those skilled in the art may conceive of changes or substitutions based on the specific implementation provided by the present application, which should all be included in the protection scope of the present application.
Claims
1. A person recognition method, characterized in that: include: Get the first picture; Inputting the first picture into a pre-trained neural network model to obtain a first clothing feature; Determine a matching clothing feature in clothing features of each preset clothing feature group of N preset clothing feature groups; the matching clothing feature is a clothing feature in the current preset clothing feature group with the highest similarity to the first clothing feature; the clothing features of each preset clothing feature group include clothing features of a person within a preset time period, N is an integer greater than or equal to 2, and the N preset clothing feature groups correspond one to one to N different people; Determining a weight of the first clothing feature, the weight being used to indicate a degree of difference between the first clothing feature and other clothing features, the greater the degree of difference, the greater the value of the weight of the first clothing feature; According to the weight of the first clothing feature and all the determined matching clothing features, N matching degrees are calculated, and the N matching degrees correspond to the N preset clothing feature groups one by one; Determine the matching degree with the highest value among the N matching degrees as the target matching degree; The person corresponding to the target clothing feature group is determined as the target person, and the target clothing feature group is the clothing feature group corresponding to the target matching degree among the N preset clothing feature groups.
2. The person recognition method according to claim 1, characterized in that: The first picture is taken in real time, or is selected from stored pictures.
3. The person recognition method according to claim 1 or 2, characterized in that: The first clothing feature includes: a top, pants, a skirt, shoes, socks, a bag, a hat or a scarf.
4. The person recognition method according to claim 1 or 2, characterized in that: The character recognition method further comprises: Get at least two pictures that include people; Inputting the at least two pictures including people into the pre-trained neural network model to obtain clothing features of each of the at least two pictures including people; All the clothing features obtained are divided according to the characters to obtain N preset clothing feature groups.
5. The person recognition method according to claim 1 or 2, characterized in that: The pre-trained neural network model is used to obtain clothing features of the person in the input picture based on the input picture.
6. The person recognition method according to claim 5, characterized in that: The pre-trained neural network model is also used to determine the weights of the obtained clothing features.
7. The person recognition method according to claim 6, characterized in that: The step of determining the weight of the first clothing feature comprises: After the first picture is input into the pre-trained neural network model, the weight of the first clothing feature is obtained.
8. A person recognition device, characterized in that: include: An acquiring unit, configured to acquire a first picture; a processing unit, configured to input the first image acquired by the acquisition unit into a pre-trained neural network model stored in a storage unit to obtain a first clothing feature; a determination unit, configured to determine a matching clothing feature in clothing features of each preset clothing feature group of N preset clothing feature groups; the matching clothing feature is a clothing feature in the current preset clothing feature group with the highest similarity to the first clothing feature obtained by the processing unit; the clothing features of each preset clothing feature group include clothing features of a person within a preset time period, N is an integer greater than or equal to 2, and the N preset clothing feature groups correspond one to one to N different persons; The determining unit is further used to determine a weight of the first clothing feature, wherein the weight is used to indicate a degree of difference between the first clothing feature and other clothing features, and the greater the degree of difference, the greater the value of the weight of the first clothing feature; A calculation unit, which calculates N matching degrees according to the weight of the first clothing feature determined by the determination unit and all the matching clothing features determined, wherein the N matching degrees correspond one-to-one to the N preset clothing feature groups; The determination unit is further used to determine the matching degree with the highest value among the N matching degrees calculated by the calculation unit as the target matching degree, and to determine the person corresponding to the target clothing feature group as the target person, wherein the target clothing feature group is the clothing feature group corresponding to the target matching degree among the N preset clothing feature groups.
9. The person recognition device according to claim 8, characterized in that: The first picture is taken in real time, or is selected from stored pictures.
10. The person recognition device according to claim 8 or 9, characterized in that: The first clothing feature includes: a top, pants, a skirt, shoes, socks, a bag, a hat or a scarf.
11. The person recognition device according to claim 8 or 9, characterized in that: The acquisition unit is further used to acquire at least two pictures including people; The processing unit is further used to input the at least two pictures including people acquired by the acquisition unit into the pre-trained neural network model to obtain clothing features of each of the at least two pictures including people; And it is used to divide all the obtained clothing features according to the characters to obtain N preset clothing feature groups.
12. The person recognition device according to claim 8 or 9, characterized in that: The pre-trained neural network model is used to obtain clothing features of the person in the input picture based on the input picture.
13. The person recognition device according to claim 12, characterized in that: The pre-trained neural network model is also used to determine the weights of the obtained clothing features.
14. The person recognition device according to claim 13, characterized in that: The determining unit is specifically used for: After the first picture is input into the pre-trained neural network model, the weight of the first clothing feature is obtained.
15. A person recognition device, characterized in that: The character recognition device includes a memory and a processor; the memory and the processor are coupled; the memory is used to store computer program code, and the computer program code includes computer instructions; when the processor executes the computer instructions, the character recognition device executes the character recognition method as described in any one of claims 1-7.
16. A chip system, characterized in that: The chip system is applied to an electronic device; the chip system includes one or more interface circuits and one or more processors; the interface circuit and the processor are interconnected through lines; the interface circuit is used to receive a signal from a memory of the electronic device and send the signal to the processor, the signal including computer instructions stored in the memory; when the processor executes the computer instructions, the electronic device executes the person recognition method as described in any one of claims 1 to 7.
17. A computer-readable storage medium, characterized in that: It comprises computer instructions, and when the computer instructions are executed on a person recognition device, the person recognition device executes the person recognition method as claimed in any one of claims 1 to 7.
18. A computer program product, characterized in that It comprises computer instructions, and when the computer instructions are executed on a person recognition device, the person recognition device executes the person recognition method as claimed in any one of claims 1 to 7.
Citation Information
Patent Citations
Garment image retrieval system and method through indirect relevance feedback without checking source
CN107622071A
Dressing recommendation method and mobile terminal
CN108197898A