WO2021159842A1 - 人脸抓拍架构及其人脸抓拍方法、装置、设备及存储介质 - Google Patents

人脸抓拍架构及其人脸抓拍方法、装置、设备及存储介质 Download PDF

Info

Publication number
WO2021159842A1
WO2021159842A1 PCT/CN2020/135513 CN2020135513W WO2021159842A1 WO 2021159842 A1 WO2021159842 A1 WO 2021159842A1 CN 2020135513 W CN2020135513 W CN 2020135513W WO 2021159842 A1 WO2021159842 A1 WO 2021159842A1
Authority
WO
WIPO (PCT)
Prior art keywords
capture
video stream
face
camera device
service instance
Prior art date
Application number
PCT/CN2020/135513
Other languages
English (en)
French (fr)
Inventor
丁伟
李影
张国辉
宋晨
Original Assignee
平安科技(深圳)有限公司
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 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2021159842A1 publication Critical patent/WO2021159842A1/zh

Links

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
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5083Techniques for rebalancing the load in a distributed system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/161Detection; Localisation; Normalisation
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • This application relates to the field of artificial intelligence and monitoring technology, and in particular to a face capture architecture and its face capture method, device, equipment and storage medium.
  • the place In the field of monitoring technology, for places with a large flow of people, the place is usually managed and decision-making through methods such as human flow statistics and face capture.
  • One of the purposes of the embodiments of the present application is to provide a face capture architecture and a face capture method, device, equipment, and storage medium, wherein the architecture has clear functions, strong maintainability, and strong functional scalability; supporting distributed clusters Deploy, dynamically adjust the capture task; and realize real-time face capture of multiple cameras at the same time, and support the number of high-concurrency video streams.
  • the first aspect of the embodiments of the present application provides a face capture architecture, including: a server, a video stream capture service instance communicatively connected to the server, and a camera device communicatively connected to the video stream capture service instance;
  • the number of the video stream capture service instance is dynamically deployed according to the number of graphics cards in the server, and the video stream capture service instance receives a face capture task request sent by the server to control the camera device to perform real-time Face capture operation.
  • a second aspect of the embodiments of the present application provides a method for capturing a face, and the method for capturing a face includes:
  • the server in the face capture architecture receives a face capture task request sent by the control center, and the face capture task request contains the camera device information corresponding to the current capture task;
  • the server obtains the load information of the video stream capture service instance used to control the camera device to perform the face capture task in the face capture architecture, and sends the camera device information to the video stream capture service instance according to the load information, So as to balance the load of the video stream capture service instance;
  • the video stream capture server instance connects to the camera device according to the camera device information, controls the camera device to capture the face, and feeds back the captured data to the control center through the server.
  • a third aspect of the embodiments of the present application provides a face capture device, the face capture device including:
  • the receiving module is configured to receive the face capture task request sent by the control center through the server in the face capture architecture, and the face capture task request contains the camera equipment information corresponding to the current capture task;
  • the processing module is configured to obtain the load information of the video stream capture service instance in the face capture architecture for controlling the camera device to perform the face capture task through the server, and send to the video stream capture service instance according to the load information The information of the camera equipment to balance the load of the video stream capture service instance;
  • the execution module is configured to connect a camera device according to the camera device information through the video stream capture server instance and control the camera device to perform face capture, and feed the captured data to the control center through the server.
  • the fourth aspect of the embodiments of the present application provides a computer device, including a memory, a processor, and a computer program stored in the memory and running on the computer device, wherein when the processor executes the computer program
  • the implementation steps include:
  • the video stream capture server instance Through the video stream capture server instance, connect a camera device according to the camera device information and control the camera device to capture a face, and feed back the captured data to the control center through the server.
  • the fifth aspect of the embodiments of the present application provides a computer-readable storage medium, the computer-readable storage medium stores a computer program, and the steps of implementing the computer program when the computer program is executed by a processor include:
  • the video stream capture server instance Through the video stream capture server instance, connect a camera device according to the camera device information and control the camera device to capture a face, and feed back the captured data to the control center through the server.
  • the face capture architecture includes servers, video stream capture service instances, and camera equipment.
  • the communication connection between the server and the video stream capture service instance, and the communication connection between the video stream capture service instance and the camera device, the architecture functions are clear.
  • the number of the video stream capture service instance is dynamically deployed according to the number of graphics cards in the server, and the video stream capture service instance requests to control a plurality of the camera equipment to perform real-time operations by receiving the face capture task of the server Face capture operation realizes that one server supports the deployment of multiple video stream capture service instances, flexibly manages multiple video stream capture service instances, and one video stream capture service instance can flexibly control multiple camera devices, and supports real-time capture of multiple video streams Number, maintainability and scalability are strong.
  • FIG. 1 is a schematic structural diagram of the face capture architecture provided by the first embodiment of the application
  • FIG. 2 is a flowchart of an implementation of a method for capturing a face according to a second embodiment of the application
  • FIG. 3 is an implementation flowchart of a face capture method provided by the third embodiment of this application.
  • FIG. 4 is a flowchart of an implementation of a method for capturing a face according to a fourth embodiment of this application;
  • FIG. 5 is a structural block diagram of a face capture device provided by a fifth embodiment of this application.
  • FIG. 6 is a structural block diagram of a computer device provided by the sixth embodiment of this application.
  • FIG. 1 is a schematic diagram of a face capture architecture provided by the first embodiment of the application.
  • the face capture architecture is mainly used in the background system.
  • the face capture architecture provided by the first embodiment of the present application includes a server, a video stream capture service instance communicatively connected to the server, and a camera device communicatively connected to the video stream capture service instance; wherein, The number of the video stream capture service instance is dynamically deployed according to the number of graphics cards in the server, and the video stream capture service instance requests to control the camera device to perform real-time facial capture by receiving a face capture task sent by the server Snapshot operation.
  • the number of graphics cards represents the number of GPU resources of the server, and the configuration of the graphics cards of the server can be 1, 2, 4, etc., among which, one graphics card in the server can deploy one video stream correspondingly Snapshot service instance.
  • the video stream capture service instance in each server is deployed as dynamic deployment, that is, for a server with multiple graphics cards, a video stream capture service instance with fewer than the number of graphics cards can be deployed, or it can be deployed equal to the number of graphics cards.
  • the server manages all deployed video stream capture service instances, all camera equipment, and the association relationship between the camera equipment and the video stream capture service instance, and is used to receive information from the control center Snapshot request.
  • the association relationship between the camera device and the video stream capture service instance is dynamic and configurable. For example, in different capture tasks, the corresponding video stream capture service instance associated with the same camera device can be different; A video stream capture service instance can also be associated with one camera device, or associated with multiple camera devices, etc., which can be configured according to the current server load situation or the task requirements of the operator, which is highly flexible.
  • the video stream capture service instance is connected to the camera device through protocol communication.
  • the video stream capture service instance is responsible for GPU decoding, face detection operations and the operation of pushing the captured data to the server on the camera device associated with it.
  • a video stream capture service instance can connect and manage multiple camera equipment correspondingly, and realize a video stream capture service instance to capture real-time faces of multiple camera equipment at the same time, support high concurrent video streams, and maintainable Strong and extensible.
  • the server and the video stream capture service instance communicate through shared memory, that is, in the same server, any video stream capture service instance pushes the capture data to the server, then other video stream capture service instances in the server can also be shared simultaneously Obtain the message of pushing the snapshot data, realize the sharing and transfer of data between two video stream snapshot service instances, and the communication efficiency is high.
  • the face capture architecture includes a server, a video stream capture service instance communicatively connected to the server, and a camera device communicatively connected to the video stream capture service instance; wherein the number of the video stream capture service instance Dynamic deployment is performed according to the number of graphics cards in the server, and the video stream capture service instance controls the camera device to perform real-time face capture operations by receiving a face capture task request sent by the server.
  • the architecture has clear functions, strong maintainability, and strong functional scalability, and can realize that one server supports the deployment of multiple video stream capture service instances, flexibly manages multiple video stream capture service instances, and one video stream capture service instance controls multiple cameras
  • the device supports real-time capture of multiple video streams.
  • the multiple servers set in the face capture architecture are deployed in a distributed cluster to realize the support of servers in the face capture architecture Dynamically adjust the capture task with the server.
  • the face capture architecture uses a switch to exchange data with an external control center in the form of a message queue.
  • Distributed cluster deployment of multiple servers in the face capture architecture is embodied as: in the face capture architecture, if the face capture task run by one server is published to the designated exchange through the rabbitMQ publish message queue, then Other servers can synchronously obtain the capture task load status of all servers in the face capture architecture by subscribing to switch data. If the capture task of one of the servers stops, the capture task in the running of the server cluster can be dynamically adjusted to balance the load of multiple servers deployed in the face capture architecture.
  • a face capture algorithm library can also be configured in the face capture architecture.
  • the face capture algorithm library includes but is not limited to storing: face frame detection algorithm, feature point detection algorithm, At least one of a face tracking algorithm, a face quality detection algorithm, and a face feature extraction algorithm.
  • the face frame detection algorithm adopts the YOLOv3 detection model, and through the lightweight backbone network and the feature pyramid detection network, the detection speed can be improved while ensuring the accuracy.
  • the feature point detection algorithm and the face feature extraction algorithm use a lightweight network ShuffleNet model, through the 1*1 convolution kernel group convolution (pointwise group convolution) and the reorganization of the feature map obtained after the group convolution (channel shuffle) , Realize that in the process of feature point detection or face feature extraction, the calculation amount of the model is greatly reduced while maintaining the accuracy.
  • the face tracking algorithm uses the face frame and feature point offset distance prediction of continuous frames to predict the tracking situation. By introducing an adaptive target tracking window, sequential tracking is used to solve the problem of adhesion and overlap of targets in the process of multi-face tracking. Furthermore, the target is predicted by introducing a Kalman filter to improve the tracking speed and accuracy of the face tracking algorithm.
  • Face quality detection algorithms include, but are not limited to, brightness detection, angle detection, blur detection, interpupillary distance detection, occlusion detection, etc.
  • the original discrete algorithm interface is designed at the bottom, and for the various algorithms stored in the face capture algorithm library, the corresponding API interface for engineering calls is configured for each algorithm through encapsulation processing.
  • the video stream capture service instance can call the face capture algorithm library to make the face capture algorithm library based on the API interface for engineering calls internally responsible for computing resources GPU/CPU Schedule management, and use cuda parallel computing to achieve detection acceleration, so that the video stream capture service instance has high availability and high throughput data processing capabilities.
  • equipment factors such as the installation height, position, and device model of the camera equipment in different capture tasks, as well as environmental factors such as the brightness, angle, blurriness, interpupillary distance, and occlusion of the external environment, will affect the video stream capture.
  • a capture strategy configuration mechanism is configured in the face capture architecture, and several capture strategies are preset in the capture strategy configuration mechanism, for example, including but not limited to: the brightness strategy of the face capture image, Angle strategy, blurriness strategy, interpupillary distance strategy, occlusion strategy, and capture de-duplication strategy, etc. Based on this capture strategy configuration mechanism, it is possible to configure a currently applicable processing method for performing face capture for the video stream capture service instance.
  • the best quality face image can be filtered according to the number of consecutive frames in the video stream and pushed.
  • the number of consecutive frames can be the default configuration of the system, or it can be The operator customizes the configuration.
  • set a time window list used to filter the face images with the best quality the time window list is represented as a time period, and the best quality face is filtered out of all image frames belonging to the time period in the video stream The image is pushed, and the length of the time window list can also be the system default configuration or the operator's custom configuration.
  • the capture strategy of each video stream capture service instance can be flexibly configured based on the capture strategy configuration mechanism, so that in the face capture architecture, face images can be processed according to different capture strategies.
  • the capture strategy of each video stream capture service instance can also be dynamically adjusted according to the number of capture tasks and/or GPU hardware usage rate and/or system load.
  • FIG. 2 is a flowchart of an implementation of a method for capturing a face according to a second embodiment of the application. The details are as follows:
  • Step S11 The server in the face capture architecture receives the face capture task request sent by the control center, and the face capture task request contains the camera equipment information corresponding to the current capture task;
  • Step S12 The server obtains the load information of the video stream capture service instance used to control the camera device to perform the face capture task in the face capture architecture, and sends the camera to the video stream capture service instance according to the load information Device information to balance the load of the video stream capture service instance;
  • Step S13 The video stream capture server instance connects to the camera device according to the camera device information, controls the camera device to capture the face, and feeds back the captured data to the control center through the server.
  • the face capture task request sent by the control center can be received by the server in the face capture architecture, and then the face capture task request Perform analysis to obtain the camera device information corresponding to the current capture task contained in the face capture task request.
  • the imaging device information includes, but is not limited to: quantity information of the imaging device, ID information of the imaging device, and so on.
  • the server After obtaining the quantity information of the camera device and the ID information of the camera device, the server obtains the load information of the video stream capture service instance configured in the face capture architecture for controlling the camera device to perform the face capture task through monitoring. Based on the obtained load information, the camera device information is sent to the video stream capture service instance to balance the load of the video stream capture service instance configured in the server.
  • the video stream capture task instance After the video stream capture task instance obtains the camera device information of the current capture task, it connects the corresponding camera device according to the camera device information and controls the connected camera device to perform face capture operations, and pass the captured data obtained from the face capture The server feeds back to the control center, thereby realizing a complete face capture process based on the face capture architecture.
  • the video stream capture service instance uses the ID information of the camera device through protocol communication. Connect to the corresponding camera device, and then perform GPU decoding on the camera device connected to it, and then perform face capture processing to obtain capture data. Furthermore, the obtained snapshot data can be pushed to the server communicating with it through shared memory. After the server obtains the snapshot data, the server will feed back the snapshot data to the control via the rabbitMQ publish message queue. center.
  • FIG. 3 is a flow chart of an implementation of a method for capturing a face provided by the third embodiment of the present application. The details are as follows:
  • Step S21 Identify the number of currently running video stream capture service instances in the face capture architecture and the number of camera devices currently controlled by the video stream capture service instance;
  • Step S22 Combining the number of the video stream capture service instance, the number of camera devices currently controlled by the video stream capture service instance, and the number of camera devices corresponding to the current capture task, calculate the corresponding to each of the video stream capture service instances The number of connected camera equipment;
  • Step S23 According to the calculated number of camera devices corresponding to each of the video stream capture service instances, allocate camera devices to the video stream capture service instances and send corresponding camera device information.
  • the video stream capture service instance in order to achieve load balancing of the various video stream capture service instances in the face capture structure, it specifically recognizes the number of currently running video stream capture service instances in the face capture architecture and the current control of the video stream capture service instance.
  • the number of camera devices calculate each of the video stream captures
  • the service instance corresponds to the number of connected camera devices.
  • the calculation principle is the load balancing principle, that is, after the camera device corresponding to the current capture task is assigned to each video stream capture service instance, the load between each video stream capture service instance Still maintaining a balanced state.
  • each video stream capture service instance can control 10 camera devices when it is fully loaded.
  • a video stream The snapshot service instance has controlled 5 camera devices
  • the B video stream snapshot service instance has controlled 5 camera devices
  • the C video stream snapshot service instance has controlled 3 camera devices. If the face capture task needs to control the number of camera devices 5
  • one camera device corresponding to the current capture task is allocated to the A video stream capture service instance, and one camera device corresponding to the current capture task is allocated to the B video stream capture service instance.
  • the ID information of the camera device corresponding to the current capture task is sent to the three video stream capture service instances A, B, and C, respectively.
  • the system can sort the video stream capture service instances, and allocate the camera devices in order of priority.
  • the video stream capture service instance with the most connected camera devices and the video stream with the least connected camera devices can be captured The difference in the number of camera devices in the service instance is less than or equal to 1.
  • load balancing can be performed according to the ratio of the number of connected camera devices to the number of fully-loaded controllable camera devices.
  • FIG. 4 is a flowchart of an implementation of a method for capturing a face according to a fourth embodiment of this application. The details are as follows:
  • Step S31 Identify the capture strategy requirement of the current capture task from the face capture task request
  • Step S32 retrieve a capture strategy that matches the requirements of the capture strategy from the preset capture strategy configuration mechanism, and configure the capture strategy to the camera device information pointing to the camera device, so that the camera device follows the Snapshot strategy to capture faces.
  • the operator can set the policy requirements of the current capture task when sending the capture task request in the control center, such as the brightness of the captured image and the angle of the captured image. , The clarity of the captured image, the interpupillary distance of the captured image, the occlusion requirements of the captured image, the de-duplication processing method of the captured image, etc., to realize the targeted configuration of the corresponding capture strategy according to different capture tasks.
  • the face capture task request can be parsed from the face capture task request. Identify various capture strategy requirements for the current capture task.
  • the capture strategy configuration mechanism sends the corresponding capture task corresponding to the current capture strategy according to the capture strategy requirements.
  • Configure the capture strategy for each video stream capture task instance of the camera device information For example, for example, the capture strategy requirement for the camera device X1 in the current capture task is that the brightness of the captured image is 60%, and the A video stream capture task instance controls the camera device X1 in the current capture task to perform face capture processing, then, Configure the capture strategy for the camera device X1 for this A video stream capture task instance to a brightness of 60%. Therefore, based on the capture strategy configuration mechanism, the capture strategy of each video stream capture service instance can be flexibly configured to meet the capture requirements of different capture tasks.
  • FIG. 5 is a structural block diagram of a face capture device provided by a fifth embodiment of this application.
  • the units included in the device are used to execute the steps in the foregoing method embodiments.
  • the face capture device includes: a receiving module 51, a processing module 52, and an execution module 53. in:
  • the receiving module 51 is configured to receive a face capture task request sent by the control center, and the face capture task request contains the camera device information corresponding to the current capture task.
  • the processing module 52 is configured to obtain load information of each video stream capture service instance in the face capture architecture, and send to each video stream capture service instance in a load balancing manner according to the load information of each video stream capture service instance The camera device information corresponding to the current capture task, so that each video stream capture service instance connects to the camera device according to the received camera device information corresponding to the current capture task and performs face capture processing on the camera device.
  • the execution module 53 is configured to push the capture data obtained by the face capture processing of each video stream capture service instance on the camera equipment to the server communicatively connected with each video stream capture service instance, and the server will send all the captured data through the The captured data is fed back to the control center.
  • the face capture device corresponds to the aforementioned face capture method one-to-one, and will not be repeated here.
  • FIG. 6 is a structural block diagram of a computer device provided by a sixth embodiment of this application.
  • the computer device 6 of this embodiment includes: a processor 61, a memory 62, and a computer program 63 stored in the memory 62 and running on the processor 61, such as a face capture method program.
  • the processor 61 executes the computer program 63, the steps in the various embodiments of the aforementioned face capture methods are implemented.
  • the processor 61 executes the computer program 63, the function of each module in the embodiment corresponding to the aforementioned face capture device is realized.
  • the relevant description in the embodiment which will not be repeated here.
  • the computer program 63 may be divided into one or more modules (units), and the one or more modules are stored in the memory 62 and executed by the processor 61 to complete this Application.
  • the one or more modules may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program 63 in the computer device 6.
  • the computer program 63 may be divided into a receiving module, a processing module, and an execution module, and the specific functions of each module are as described above.
  • the turntable device may include, but is not limited to, a processor 61 and a memory 62.
  • FIG. 6 is only an example of the computer device 6 and does not constitute a limitation on the computer device 6. It may include more or less components than those shown in the figure, or a combination of certain components, or different components.
  • the turntable device may also include input and output devices, network access devices, buses, and so on.
  • the so-called processor 61 may be a central processing unit (Central Processing Unit, CPU), other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), and application specific integrated circuits (Application Specific Integrated Circuits). Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc.
  • the general-purpose processor may be a microprocessor or the processor may also be any conventional processor or the like.
  • the memory 62 may be an internal storage unit of the computer device 6, such as a hard disk or a memory of the computer device 6.
  • the memory 62 may also be an external storage device of the computer device 6, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), or a secure digital (Secure Digital, SD) equipped on the computer device 6. Card, Flash Card, etc.
  • the memory 62 may also include both an internal storage unit of the computer device 6 and an external storage device.
  • the memory 62 is used to store the computer program and other programs and data required by the turntable device.
  • the memory 62 can also be used to temporarily store data that has been output or will be output.
  • the embodiments of the present application also provide a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in each of the foregoing method embodiments can be realized.
  • the computer-readable storage medium may be non-volatile or volatile.
  • the embodiments of the present application provide a computer program product.
  • the steps in the foregoing method embodiments can be realized when the mobile terminal is executed.
  • the integrated module/unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium.
  • the present application implements all or part of the processes in the above-mentioned embodiments and methods, and can also be completed by instructing relevant hardware through a computer program.
  • the computer program can be stored in a computer-readable storage medium. When the program is executed by the processor, it can implement the steps of the foregoing method embodiments.
  • the computer program includes computer program code, and the computer program code may be in the form of source code, object code, executable file, or some intermediate forms.
  • the computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory) , Random Access Memory (RAM, Random Access Memory), electrical carrier signal, telecommunications signal, and software distribution media, etc.
  • ROM Read-Only Memory
  • RAM Random Access Memory
  • electrical carrier signal telecommunications signal
  • software distribution media etc.
  • the content contained in the computer-readable medium can be appropriately added or deleted according to the requirements of the legislation and patent practice in the jurisdiction.
  • the computer-readable medium Does not include electrical carrier signals and telecommunication signals.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Human Computer Interaction (AREA)
  • Multimedia (AREA)
  • General Engineering & Computer Science (AREA)
  • Studio Devices (AREA)

Abstract

一种人脸抓拍架构,包括服务器、与所述服务器通信连接的视频流抓拍服务实例以及与所述视频流抓拍服务实例通信连接的摄像设备;其中,所述视频流抓拍服务实例的数量根据所述服务器中显卡的数量进行动态部署,所述视频流抓拍服务实例通过接收所述服务器发送的人脸抓拍任务请求控制所述摄像设备进行实时的人脸抓拍操作。上述架构功能清晰、可维护性强、功能扩展性强,且可实现一个服务器支持多个视频流抓拍服务实例部署,灵活管理多个视频流抓拍服务实例,以及一个视频流抓拍服务实例控制多个摄像设备,支持实时抓拍多路数视频流。同时还提供了基于该人脸抓拍架构的人脸抓拍方法、装置、设备及存储介质。

Description

人脸抓拍架构及其人脸抓拍方法、装置、设备及存储介质
本申请要求于2020年09月22日在中国专利局提交的、申请号为202011004382.7、发明名称为“人脸抓拍架构及其人脸抓拍方法、装置、设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及人工智能、监控技术领域,尤其涉及一种人脸抓拍架构及其人脸抓拍方法、装置、设备及存储介质。
背景技术
在监控技术领域,对于人流量较大的场所,通常会通过人流量统计、人脸抓拍等方式来对场所进行管理和决策。发明人发现目前现有的用于人脸抓拍的后台管理系统的架构设计通常为基于独立模块实现人脸抓拍所涉及的摄像设备管理、实时视频流解码、人脸检测、以及抓拍数据推送等功能。此种架构在实际应用中会限制GPU服务器实时抓拍视频流的路数,出现抓拍不实时的情况。此外,发明人还发现此种架构设计还存在架构混乱,模块间耦合性大,功能扩展性弱,维护成本高等问题。
技术问题
本申请实施例的目的之一在于提供一种人脸抓拍架构及其人脸抓拍方法、装置、设备及存储介质,其中,架构功能清晰、可维护性强、功能扩展性强;支持分布式集群部署,动态调整抓拍任务;且实现了同时对多路摄像头进行实时人脸抓拍,支持高并发的视频流路数。
技术解决方案
为解决上述技术问题,本申请实施例采用的技术方案是:
本申请实施例的第一方面提供了一种人脸抓拍架构,包括:服务器、与所述服务器通信连接的视频流抓拍服务实例以及与所述视频流抓拍服务实例通信连接的摄像设备;
其中,所述视频流抓拍服务实例的数量根据所述服务器中显卡的数量进行动态部署,所述视频流抓拍服务实例通过接收所述服务器发送的人脸抓拍任务请求控制所述摄像设备进行实时的人脸抓拍操作。
本申请实施例的第二方面提供了一种人脸抓拍方法,所述人脸抓拍方法包括:
人脸抓拍架构中的服务器接收控制中心发送的人脸抓拍任务请求,所述人脸抓拍任务请求中含有当次抓拍任务所对应的摄像设备信息;
所述服务器获取人脸抓拍架构中用于控制摄像设备执行人脸抓拍任务的视频流抓拍服务实例的负载信息,并根据所述负载信息向所述视频流抓拍服务实例发送所述摄像设备信息,以使所述视频流抓拍服务实例负载均衡;
所述视频流抓拍服务器实例按照所述摄像设备信息连接摄像设备并控制所述摄像设备进行人脸抓拍,以及将抓拍数据通过所述服务器反馈至所述控制中心。
本申请实施例的第三方面提供了一种人脸抓拍装置,所述人脸抓拍装置包括:
接收模块,用于通过人脸抓拍架构中的服务器接收控制中心发送的人脸抓拍任务请求,所述人脸抓拍任务请求中含有当次抓拍任务所对应的摄像设备信息;
处理模块,用于通过所述服务器获取人脸抓拍架构中用于控制摄像设备执行人脸抓拍任务的视频流抓拍服务实例的负载信息,并根据所述负载信息向所述视频流抓拍服务实例发送所述摄像设备信息,以使所述视频流抓拍服务实例负载均衡;
执行模块,用于通过所述视频流抓拍服务器实例按照所述摄像设备信息连接摄像设备并控制所述摄像设备进行人脸抓拍,以及将抓拍数据通过所述服务器反馈至所述控制中心。
本申请实施例的第四方面提供了一种计算机设备,包括存储器、处理器以及存储在所述存储器中并可在计算机设备上运行的计算机程序,其中,所述处理器执行所述计算机程序时实现步骤包括:
通过人脸抓拍架构中的服务器接收控制中心发送的人脸抓拍任务请求,所述人脸抓拍任务请求中含有当次抓拍任务所对应的摄像设备信息;
通过所述服务器获取人脸抓拍架构中用于控制摄像设备执行人脸抓拍任务的视频流抓拍服务实例的负载信息,并根据所述负载信息向所述视频流抓拍服务实例发送所述摄像设备信息,以使所述视频流抓拍服务实例负载均衡;
通过所述视频流抓拍服务器实例按照所述摄像设备信息连接摄像设备并控制所述摄像设备进行人脸抓拍,以及将抓拍数据通过所述服务器反馈至所述控制中心。
本申请实施例的第五方面提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,其中,所述计算机程序被处理器执行时实现步骤包括:
通过人脸抓拍架构中的服务器接收控制中心发送的人脸抓拍任务请求,所述人脸抓拍任务请求中含有当次抓拍任务所对应的摄像设备信息;
通过所述服务器获取人脸抓拍架构中用于控制摄像设备执行人脸抓拍任务的视频流抓拍服务实例的负载信息,并根据所述负载信息向所述视频流抓拍服务实例发送所述摄像设备信息,以使所述视频流抓拍服务实例负载均衡;
通过所述视频流抓拍服务器实例按照所述摄像设备信息连接摄像设备并控制所述摄像设备进行人脸抓拍,以及将抓拍数据通过所述服务器反馈至所述控制中心。
有益效果
本申请的有益效果在于:
人脸抓拍架构包括服务器、视频流抓拍服务实例以及摄像设备,服务器与视频流抓拍服务实例之间通信连接,视频流抓拍服务实例与摄像设备之间通信连接,架构功能清晰。所述视频流抓拍服务实例的数量根据所述服务器中显卡的数量进行动态部署,所述视频流抓拍服务实例通过接收所述服务器的人脸抓拍任务请求控制多个所述摄像设备进行实时的人脸抓拍操作,实现了一个服务器支持多个视频流抓拍服务实例部署,灵活管理多个视频流抓拍服务实例,以及一个视频流抓拍服务实例可灵活控制多个摄像设备,支持实时抓拍多视频流路数,可维护性强、可扩展性强。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1为本申请第一实施例提供的人脸抓拍架构的一种架构示意图;
图2为本申请第二实施例提供的一种人脸抓拍方法的实现流程图;
图3为本申请第三实施例提供的一种人脸抓拍方法的实现流程图;
图4为本申请第四实施例提供的一种人脸抓拍方法的实现流程图;
图5为本申请第五实施例提供的一种人脸抓拍装置的结构框图;
图6为本申请第六实施例提供的一种计算机设备的结构框图。
本发明的实施方式
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
请参阅图1,图1为本申请第一实施例提供的人脸抓拍架构的一种架构示意图。人脸抓拍架构主要应用于后台系统中。如图1所示,本申请第一实施例提供的人脸抓拍架构包括服务器、与所述服务器通信连接的视频流抓拍服务实例以及与所述视频流抓拍服务实例通信连接的摄像设备;其中,所述视频流抓拍服务实例的数量根据所述服务器中显卡的数量进行动态部署,所述视频流抓拍服务实例通过接收所述服务器发送的人脸抓拍任务请求控制所述摄像设备进行实时的人脸抓拍操作。
本实施例中,显卡数量即表征服务器的GPU资源数量,服务器的显卡配置可以为1个、2个、4个......等,其中,服务器中的一个显卡可以对应部署一个视频流抓拍服务实例。在本实施例的具体实现中,每个服务器中的视频流抓拍服务实例部署为动态部署,即对于多显卡的服务器,可以部署少于显卡数量的视频流抓拍服务实例,也可以部署等于显卡数量的视频流抓拍服务实例。在本实施例的具体实现中,所述服务器管理其部署的所有视频流抓拍服务实例、所有摄像设备、以及摄像设备与视频流抓拍服务实例之间的关联关系,并且用于接收来自控制中心的抓拍请求。可以理解的是,摄像设备与视频流抓拍服务实例之间的关联关系是动态的、可配置的,例如在不同的抓拍任务中,同一个摄像设备对应关联的视频流抓拍服务实例可以不同;同一个视频流抓拍服务实例也可以关联一个摄像设备、或者关联多个摄像设备等,具体可依据当前服务器的负载情况或操作人员的任务需求进行配置,灵活性强。视频流抓拍服务实例通过协议通信的方式与摄像设备连接,视频流抓拍服务实例负责对与其关联的摄像设备进行GPU解码、人脸检测操作和推送抓拍数据给服务器的操作。由此,一个视频流抓拍服务实例可以对应连接和管理多路摄像设备,实现了一个视频流抓拍服务实例同时对多路摄像设备进行实时人脸抓拍,支持高并发的视频流路数,可维护性强、可扩展性强。服务器与视频流抓拍服务实例之间通过共享内存的方式通信,即同一个服务器中,任意一个视频流抓拍服务实例推送抓拍数据给服务器,则该服务器中的其他视频流抓拍服务实例也可同步共享获得该推送抓拍数据的消息,实现两两视频流抓拍服务实例相互之间共享和传递数据,通信效率高。
上述实施例提供的人脸抓拍架构包括服务器、与所述服务器通信连接的视频流抓拍服务实例以及与所述视频流抓拍服务实例通信连接的摄像设备;其中,所述视频流抓拍服务实例的数量根据所述服务器中显卡的数量进行动态部署,所述视频流抓拍服务实例通过接收所述服务器发送的人脸抓拍任务请求控制所述摄像设备进行实时的人脸抓拍操作。架构功能清晰、可维护性强、功能扩展性强,且可实现一个服务器支持多个视频流抓拍服务实例部署,灵活管理多个视频流抓拍服务实例,以及一个视频流抓拍服务实例控制多个摄像设备,支持实时抓拍多视频流路数。
本申请的一些实施例中,当人脸抓拍架构设置有多个服务器时,则在该人脸抓拍架构中对其设置的多个服务器进行分布式集群部署,实现在人脸抓拍架构中支持服务器与服务器之间动态调整抓拍任务。在本实施例中,该人脸抓拍架构通过交换机以消息队列的方式与外部控制中心进行数据交互。通过对该人脸抓拍架构中的多个服务器进行分布式集群部署体现为:在该人脸抓拍架构中,若一个服务器运行的人脸抓拍任务通过rabbitMQ publish消息队列发布到指定的交换机中,则其他服务器可以通过订阅交换机数据的方式同步获得该人脸抓拍架构中所有服务器的抓拍任务负载情况。若其中一个服务器的抓拍任务停止,则可以通过动态调整服务器集群运行中的抓拍任务,使得该人脸抓拍架构中部署的多个服务器负载均衡。
本申请的一些实施例中,还可以在人脸抓拍架构中配置一人脸抓拍算法库,在该人脸抓拍算法库中,包括但不限于存储有:人脸框检测算法、特征点检测算法、人脸跟踪算法、人脸质量检测算法、人脸特征提取算法中的至少一种。其中,人脸框检测算法采用的是YOLOv3检测模型,通过轻量级主干网络和特征金字塔检测网络,实现在保证精度的同时,提高检测速度。特征点检测算法以及人脸特征提取算法采用轻量级网络ShuffleNet模型,通过1*1卷积核的分组卷积(pointwise group convolution)以及对分组卷积后得到的特征图进行重组(channel shuffle),实现在特征点检测或人脸特征提取过程中,保持精度的同时大大降低了模型的计算量。人脸跟踪算法采用的是通过连续帧的人脸框和特征点偏移距离预测追踪情况,通过引入自适应目标跟踪窗口,通过序贯跟踪解决多人脸跟踪过程中目标发生粘连重叠的问题。进一步地,还通过引入卡尔曼滤波器对目标进行预测,提高人脸跟踪算法的跟踪速度和准确性。人脸质量检测算法包括但不限于亮度检测、角度检测、模糊度检测、瞳间距检测、遮挡检测等。基于该人脸抓拍算法库在底层设计原始的离散算法接口,而针对于该人脸抓拍算法库中存储的各种算法,通过封装处理分别为每种算法配置对应的供工程化调用的API接口,视频流抓拍服务实例对与其关联的摄像设备进行人脸检测时,可以通过调用该人脸抓拍算法库,使得该人脸抓拍算法库基于供工程化调用的API接口内部负责计算资源GPU/CPU调度管理,并且利用cuda并行计算来实现检测加速,从而使得视频流抓拍服务实例具有高可用和高吞吐量的数据处理能力。
本申请的一些实施例中,不同抓拍任务中摄像设备的架设高度、位置、设备型号等设备因素以及外部环境的亮度、角度、模糊度、瞳间距、遮挡等环境因素均会影响到视频流抓拍服务实例的抓拍结果。在本实施例中,通过在人脸抓拍架构中配置一抓拍策略配置机制,所述抓拍策略配置机制中预先设定有若干抓拍策略,例如,包括但不限于:人脸抓拍图像的亮度策略、角度策略、模糊度策略、瞳间距策略、遮挡策略,以及抓拍去重策略等等。基于该抓拍策略配置机制,可以为所述视频流抓拍服务实例配置出当前适用的执行人脸抓拍的处理方式。举例说明,例如抓拍去重策略,基于精准抓拍模式,可以根据视频流中若干连续帧的数目来筛选出质量最优的人脸图像进行推送,连续帧的数量可以是系统默认配置,也可以是操作人员自定义配置。或者,设置用于筛选质量最优的人脸图像的时间窗口列表,该时间窗口列表即表征为时间段,通过在视频流中属于该时间段的所有图像帧中筛选出质量最优的人脸图像进行推送,该时间窗口列表的长短也可以是系统默认配置或操作人员自定义配置。由此基于抓拍策略配置机制灵活配置各视频流抓拍服务实例的抓拍策略,实现在人脸抓拍架构中,可以根据不同的抓拍策略来处理人脸图像。在实际使用中,还可以根据抓拍任务数量和/或GPU硬件使用率和/或系统负载情况动态调整各视频流抓拍服务实例的抓拍策略。
请参阅图2,图2为本申请第二实施例提供的一种人脸抓拍方法的实现流程图。详述如下:
步骤S11:人脸抓拍架构中的服务器接收控制中心发送的人脸抓拍任务请求,所述人脸抓拍任务请求中含有当次抓拍任务所对应的摄像设备信息;
步骤S12:所述服务器获取人脸抓拍架构中用于控制摄像设备执行人脸抓拍任务的视频流抓拍服务实例的负载信息,并根据所述负载信息向所述视频流抓拍服务实例发送所述摄像设备信息,以使所述视频流抓拍服务实例负载均衡;
步骤S13:所述视频流抓拍服务器实例按照所述摄像设备信息连接摄像设备并控制所述摄像设备进行人脸抓拍,以及将抓拍数据通过所述服务器反馈至所述控制中心。
本实施例中,可以基于上述第一实施例提供的人脸抓拍架构,可以通过人脸抓拍架构中的服务器接收控制中心发送来的人脸抓拍任务请求,然后通过对该人脸抓配任务请求进行解析,获取得到该人脸抓拍任务请求中含有的当次抓拍任务所对应的摄像设备信息。其中,该摄像设备信息包括但不限于:摄像设备的数量信息、摄像设备的ID信息等。获取得到该摄像设备的数量信息以及摄像设备的ID信息后,服务器通过监听获取当前该人脸抓拍架构中配置的用于控制摄像设备执行人脸抓拍任务的视频流抓拍服务实例的负载信息。基于该获取得到的负载信息,向视频流抓拍服务实例发送摄像设备信息,以使服务器中配置的视频流抓拍服务实例负载均衡。当视频流抓拍任务实例获得当次抓拍任务的摄像设备信息后,按照该摄像设备信息连接对应的摄像设备并控制该连接的摄像设备进行人脸抓拍操作,以及将人脸抓拍获得的抓拍数据通过服务器反馈至控制中心,由此基于人脸抓拍架构实现完整的人脸抓拍过程。本实施例中,当各个视频流抓拍服务实例都分别接收到当次抓拍任务所对应的摄像设备的ID信息后,由所述视频流抓拍服务实例根据摄像设备的ID信息,通过协议通信的方式与对应的摄像设备连接,进而,对与其连接的摄像设备进行GPU解码,然后进行人脸抓拍处理来获取抓拍数据。进而,可以通过共享内存方式将获得的抓拍数据推送给与其通信连接的服务器,当服务器获得抓拍数据后,则再通过rabbitMQ publish消息队列的方式由所述服务器将所述抓拍数据反馈至所述控制中心。
本申请的一些实施例中,请参阅图3,图3为本申请第三实施例提供的一种人脸抓拍方法的实现流程图。详述如下:
步骤S21:识别人脸抓拍架构中当前运行的视频流抓拍服务实例的数量以及所述视频流抓拍服务实例当前控制的摄像设备数量;
步骤S22:结合所述视频流抓拍服务实例的数量、所述视频流抓拍服务实例当前控制的摄像设备数量以及当次抓拍任务对应的摄像设备数量,计算出每个所述视频流抓拍服务实例对应连接的摄像设备的数量;
步骤S23:根据计算出的每个所述视频流抓拍服务实例对应连接的摄像设备的数量,向所述视频流抓拍服务实例分配摄像设备并发送对应的摄像设备信息。
本实施例中,为了实现人脸抓拍结构中各个视频流抓拍服务实例负载均衡,具体通过识别人脸抓拍架构中当前运行的视频流抓拍服务实例的数量以及所述视频流抓拍服务实例当前控制的摄像设备数量,进而,结合所述视频流抓拍服务实例的数量、所述视频流抓拍服务实例当前控制的摄像设备数量以及当次抓拍任务对应的摄像设备数量,计算出每个所述视频流抓拍服务实例对应连接的摄像设备的数量,其计算原则为负载均衡原则,即将所述当次抓拍任务对应的摄像设备对应分配到各个视频流抓拍服务实例后,各个视频流抓拍服务实例之间的负载仍保持均衡状态。举例说明,例如人脸抓拍架构中共有A、B、C三个视频流抓拍服务实例在运行,且每个视频流抓拍服务实例满载情况下均可控制10台摄像设备,此时若A视频流抓拍服务实例已控制5台摄像设备,B视频流抓拍服务实例已控制5台摄像设备,C视频流抓拍服务实例已控制3台摄像设备,若当次人脸抓拍任务需要控制的摄像设备数量5台,那么以负载均衡的方式,则向A视频流抓拍服务实例分配1台当次抓拍任务所对应的摄像设备,向B视频流抓拍服务实例分配1台当次抓拍任务所对应的摄像设备,向C视频流抓拍服务实例分配3台当次抓拍任务所对应的摄像设备。由此,根据分配结果向A、B、C三个视频流抓拍服务实例分别发送当次抓拍任务所对应的摄像设备的ID信息。在一些具体的实施方式中,若每个视频流抓拍服务实例满载可控制摄像设备的数量相同时,针对于当次抓拍任务对应的摄像设备的数量无法使得分配后各视频流抓拍服务实例连接的摄像设备数量相等的情况下,可以通过系统对各视频流抓拍服务实例进行排序,按照顺序优先进行摄像设备的分配,且连接摄像设备最多的视频流抓拍服务实例与连接摄像设备最少的视频流抓拍服务实例摄像设备数量相差少于等于1。在一些具体的实施方式中,若每个视频流抓拍服务实例满载可控制摄像设备的数量不相同时,可以按照连接摄像设备数量与满载可控摄像设备数量的比值来进行负载均衡分配。
请参阅图4,图4为本申请第四实施例提供的一种人脸抓拍方法的实现流程图。详述如下:
步骤S31:从所述人脸抓拍任务请求中识别出当次抓拍任务的抓拍策略需求;
步骤S32:从预设的抓拍策略配置机制中调取与所述抓拍策略需求匹配的抓拍策略,并向所述摄像设备信息指向摄像设备配置所述抓拍策略,以使所述摄像设备按照所述抓拍策略进行人脸抓拍。
本实施例中,基于上述第一实施例提供的人脸抓拍架构,操作人员可以通过在控制中心发送抓拍任务请求时设定当次抓拍任务的策略需求,例如抓图像的亮度、抓拍图像的角度、抓拍图像的清晰程度、抓拍图像的瞳间距、抓拍图像的遮挡要求、抓拍的去重处理方式等等,实现根据不同的抓拍任务有针对性地配置对应的抓拍策略。在本实施例中,基于操作人员的策略设定,接收控制中心发送来的人脸抓拍任务请求后,即可通过对所述人脸抓拍任务请求进行解析,从所述人脸抓拍任务请求中识别出当次抓拍任务的各种抓拍策略需求。进而,通过将所述当次抓拍任务的抓拍策略需求传送至所述人脸抓拍架构预设的抓拍策略配置机制中,由该抓拍策略配置机制根据抓拍策略需求为发送有当次抓拍任务所对应的摄像设备信息的各视频流抓拍任务实例配置抓拍策略。举例说明,例如,当次抓拍任务中针对摄像设备X1的抓拍策略需求为抓拍图像亮度要求60%,而A视频流抓拍任务实例控制当次抓拍任务中摄像设备X1进行人脸抓拍处理,那么,为该A视频流抓拍任务实例配置关于针对摄像设备X1的抓拍策略为亮度60%。由此基于抓拍策略配置机制灵活配置各视频流抓拍服务实例的抓拍策略,可以满足不同抓拍任务的抓拍需求。
请参阅图5,图5为本申请第五实施例提供的一种人脸抓拍装置的结构框图。本实施例中该装置包括的各单元用于执行上述方法实施例中的各步骤。具体请参阅上述方法实施例中的相关描述。为了便于说明,仅示出了与本实施例相关的部分。如图5所示,人脸抓拍装置包括:接收模块51、处理模块52以及执行模块53。其中:
所述接收模块51用于接收控制中心发送的人脸抓拍任务请求,所述人脸抓拍任务请求中含有当次抓拍任务所对应的摄像设备信息。所述处理模块52用于获取人脸抓拍架构中各视频流抓拍服务实例的负载信息,根据所述各视频流抓拍服务实例的负载信息以负载均衡的方式向所述各视频流抓拍服务实例发送当次抓拍任务所对应的摄像设备信息,以使所述各视频流抓拍服务实例根据接收的当次抓拍任务所对应的摄像设备信息连接摄像设备并对摄像设备进行人脸抓拍处理。所述执行模块53用于将各视频流抓拍服务实例对摄像设备进行人脸抓拍处理获得的抓拍数据推送给与所述各视频流抓拍服务实例通信连接的服务器,并通过由所述服务器将所述抓拍数据反馈至所述控制中心。
所述人脸抓拍装置,与上述的人脸抓拍方法一一对应,此处不再赘述。
请参阅图6,图6为本申请第六实施例提供的一种计算机设备的结构框图。如图6所示,该实施例的计算机设备6包括:处理器61、存储器62以及存储在所述存储器62中并可在所述处理器61上运行的计算机程序63,例如人脸抓拍方法的程序。处理器61执行所述计算机程序63时实现上述各个人脸抓拍方法各实施例中的步骤。或者,所述处理器61执行所述计算机程序63时实现上述人脸抓拍装置对应的实施例中各模块的功能。具体请参阅实施例中的相关描述,此处不赘述。
示例性的,所述计算机程序63可以被分割成一个或多个模块(单元),所述一个或者多个模块被存储在所述存储器62中,并由所述处理器61执行,以完成本申请。所述一个或多个模块可以是能够完成特定功能的一系列计算机程序指令段,该指令段用于描述所述计算机程序63在所述计算机设备6中的执行过程。例如,所述计算机程序63可以被分割成接收模块、处理模块和执行模块,各模块具体功能如上所述。
所述转台设备可包括,但不仅限于,处理器61、存储器62。本领域技术人员可以理解,图6仅仅是计算机设备6的示例,并不构成对计算机设备6的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如所述转台设备还可以包括输入输出设备、网络接入设备、总线等。
所称处理器61可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
所述存储器62可以是所述计算机设备6的内部存储单元,例如计算机设备6的硬盘或内存。所述存储器62也可以是所述计算机设备6的外部存储设备,例如所述计算机设备6上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,所述存储器62还可以既包括所述计算机设备6的内部存储单元也包括外部存储设备。所述存储器62用于存储所述计算机程序以及所述转台设备所需的其他程序和数据。所述存储器62还可以用于暂时地存储已经输出或者将要输出的数据。
需要说明的是,上述装置/单元之间的信息交互、执行过程等内容,由于与本申请方法实施例基于同一构思,其具体功能及带来的技术效果,具体可参见方法实施例部分,此处不再赘述。
本申请实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现可实现上述各个方法实施例中的步骤。在本实施例中,所述计算机可读存储介质可以是非易失性,也可以是易失性。
本申请实施例提供了一种计算机程序产品,当计算机程序产品在移动终端上运行时,使得移动终端执行时实现可实现上述各个方法实施例中的步骤。
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元、模块完成,即将所述装置的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。实施例中的各功能单元、模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中,上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。另外,各功能单元、模块的具体名称也只是为了便于相互区分,并不用于限制本申请的保护范围。上述系统中单元、模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
所述集成的模块/单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实现上述实施例方法中的全部或部分流程,也可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一计算机可读存储介质中,该计算机程序在被处理器执行时,可实现上述各个方法实施例的步骤。其中,所述计算机程序包括计算机程序代码,所述计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述计算机可读介质可以包括:能够携带所述计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、电载波信号、电信信号以及软件分发介质等。需要说明的是,所述计算机可读介质包含的内容可以根据司法管辖区内立法和专利实践的要求进行适当的增减,例如在某些司法管辖区,根据立法和专利实践,计算机可读介质不包括是电载波信号和电信信号。
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述或记载的部分,可以参见其它实施例的相关描述。
以上所述实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。

Claims (16)

  1. 一种人脸抓拍架构,其中,所述人脸抓拍架构包括服务器、与所述服务器通信连接的视频流抓拍服务实例以及与所述视频流抓拍服务实例通信连接的摄像设备;
    其中,所述视频流抓拍服务实例的数量根据所述服务器中显卡的数量进行动态部署,所述视频流抓拍服务实例通过接收所述服务器发送的人脸抓拍任务请求控制所述摄像设备进行实时的人脸抓拍操作。
  2. 根据权利要求1所述的人脸抓拍架构,其中,若所述人脸抓拍架构中配置有多个所述服务器,则多个所述服务器在所述人脸抓拍架构中呈分布式集群部署。
  3. 根据权利要求1所述的人脸抓拍架构,其中,所述人脸抓拍架构中还配置有一人脸抓拍算法库,其中,所述人脸抓拍算法库中存储有人脸框检测算法、特征点检测算法、人脸跟踪算法、人脸质量检测算法、人脸特征提取算法中的至少一种,且各算法配置有对应的供工程化调用的API接口。
  4. 根据权利要求1-3任意一项所述的人脸抓拍架构,其中,所述人脸抓拍架构中还配置有一抓拍策略配置机制,基于所述抓拍策略配置机制中预先设定的若干抓拍策略,为所述视频流抓拍服务实例配置执行人脸抓拍的处理方式。
  5. 一种人脸抓拍方法,其中,包括:
    人脸抓拍架构中的服务器接收控制中心发送的人脸抓拍任务请求,所述人脸抓拍任务请求中含有当次抓拍任务所对应的摄像设备信息;
    所述服务器获取人脸抓拍架构中用于控制摄像设备执行人脸抓拍任务的视频流抓拍服务实例的负载信息,并根据所述负载信息向所述视频流抓拍服务实例发送所述摄像设备信息,以使所述视频流抓拍服务实例负载均衡;
    所述视频流抓拍服务器实例按照所述摄像设备信息连接摄像设备并控制所述摄像设备进行人脸抓拍,以及将抓拍数据通过所述服务器反馈至所述控制中心。
  6. 根据权利要求5所述的人脸抓拍方法,其中,还包括:
    从所述人脸抓拍任务请求中识别出当次抓拍任务的抓拍策略需求;
    从预设的抓拍策略配置机制中调取与所述抓拍策略需求匹配的抓拍策略,并向所述摄像设备信息指向摄像设备配置所述抓拍策略,以使所述摄像设备按照所述抓拍策略进行人脸抓拍。
  7. 根据权利要求5所述的人脸抓拍方法,其中,所述根据所述负载信息向所述视频流抓拍服务实例发送所述摄像设备信息,以使所述视频流抓拍服务实例负载均衡,包括:
    识别人脸抓拍架构中当前运行的视频流抓拍服务实例的数量以及所述视频流抓拍服务实例当前控制的摄像设备数量;
    结合所述视频流抓拍服务实例的数量、所述视频流抓拍服务实例当前控制的摄像设备数量以及当次抓拍任务对应的摄像设备数量,计算出每个所述视频流抓拍服务实例对应连接的摄像设备的数量;
    根据计算出的每个所述视频流抓拍服务实例对应连接的摄像设备的数量,向所述视频流抓拍服务实例分配摄像设备并发送对应的摄像设备信息。
  8. 一种人脸抓拍装置,其中,包括:
    接收模块,用于通过人脸抓拍架构中的服务器接收控制中心发送的人脸抓拍任务请求,所述人脸抓拍任务请求中含有当次抓拍任务所对应的摄像设备信息;
    处理模块,用于通过所述服务器获取人脸抓拍架构中用于控制摄像设备执行人脸抓拍任务的视频流抓拍服务实例的负载信息,并根据所述负载信息向所述视频流抓拍服务实例发送所述摄像设备信息,以使所述视频流抓拍服务实例负载均衡;
    执行模块,用于通过所述视频流抓拍服务器实例按照所述摄像设备信息连接摄像设备并控制所述摄像设备进行人脸抓拍,以及将抓拍数据通过所述服务器反馈至所述控制中心。
  9. 根据权利要求8所述的人脸抓拍方法,其中,还包括:
    第一识别子模块,用于从所述人脸抓拍任务请求中识别出当次抓拍任务的抓拍策略需求;
    第一配置子模块,用于从预设的抓拍策略配置机制中调取与所述抓拍策略需求匹配的抓拍策略,并向所述摄像设备信息指向摄像设备配置所述抓拍策略,以使所述摄像设备按照所述抓拍策略进行人脸抓拍。
  10. 根据权利要求8所述的人脸抓拍方法,其中,所述根据所述负载信息向所述视频流抓拍服务实例发送所述摄像设备信息,以使所述视频流抓拍服务实例负载均衡,包括:
    第二识别子模块,用于识别人脸抓拍架构中当前运行的视频流抓拍服务实例的数量以及所述视频流抓拍服务实例当前控制的摄像设备数量;
    第一计算子模块,用于结合所述视频流抓拍服务实例的数量、所述视频流抓拍服务实例当前控制的摄像设备数量以及当次抓拍任务对应的摄像设备数量,计算出每个所述视频流抓拍服务实例对应连接的摄像设备的数量;
    第一分配子模块,用于根据计算出的每个所述视频流抓拍服务实例对应连接的摄像设备的数量,向所述视频流抓拍服务实例分配摄像设备并发送对应的摄像设备信息。
  11. 一种计算机设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,其中,所述处理器执行所述计算机程序时实现步骤包括:
    通过人脸抓拍架构中的服务器接收控制中心发送的人脸抓拍任务请求,所述人脸抓拍任务请求中含有当次抓拍任务所对应的摄像设备信息;
    通过所述服务器获取人脸抓拍架构中用于控制摄像设备执行人脸抓拍任务的视频流抓拍服务实例的负载信息,并根据所述负载信息向所述视频流抓拍服务实例发送所述摄像设备信息,以使所述视频流抓拍服务实例负载均衡;
    通过所述视频流抓拍服务器实例按照所述摄像设备信息连接摄像设备并控制所述摄像设备进行人脸抓拍,以及将抓拍数据通过所述服务器反馈至所述控制中心。
  12. 根据权利要求11所述的计算机设备,所述处理器执行所述计算机程序时实现步骤还包括:
    从所述人脸抓拍任务请求中识别出当次抓拍任务的抓拍策略需求;
    从预设的抓拍策略配置机制中调取与所述抓拍策略需求匹配的抓拍策略,并向所述摄像设备信息指向摄像设备配置所述抓拍策略,以使所述摄像设备按照所述抓拍策略进行人脸抓拍。
  13. 根据权利要求11所述的计算机设备,所述处理器执行所述计算机程序时实现步骤还包括:
    识别人脸抓拍架构中当前运行的视频流抓拍服务实例的数量以及所述视频流抓拍服务实例当前控制的摄像设备数量;
    结合所述视频流抓拍服务实例的数量、所述视频流抓拍服务实例当前控制的摄像设备数量以及当次抓拍任务对应的摄像设备数量,计算出每个所述视频流抓拍服务实例对应连接的摄像设备的数量;
    根据计算出的每个所述视频流抓拍服务实例对应连接的摄像设备的数量,向所述视频流抓拍服务实例分配摄像设备并发送对应的摄像设备信息。
  14. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机可读存储介质存储有计算机程序,其中,所述计算机程序被处理器执行时实现步骤包括:
    通过人脸抓拍架构中的服务器接收控制中心发送的人脸抓拍任务请求,所述人脸抓拍任务请求中含有当次抓拍任务所对应的摄像设备信息;
    通过所述服务器获取人脸抓拍架构中用于控制摄像设备执行人脸抓拍任务的视频流抓拍服务实例的负载信息,并根据所述负载信息向所述视频流抓拍服务实例发送所述摄像设备信息,以使所述视频流抓拍服务实例负载均衡;
    通过所述视频流抓拍服务器实例按照所述摄像设备信息连接摄像设备并控制所述摄像设备进行人脸抓拍,以及将抓拍数据通过所述服务器反馈至所述控制中心。
  15. 根据权利要求14所述的计算机可读存储介质,所述计算机程序被处理器执行时实现步骤还包括:
    从所述人脸抓拍任务请求中识别出当次抓拍任务的抓拍策略需求;
    从预设的抓拍策略配置机制中调取与所述抓拍策略需求匹配的抓拍策略,并向所述摄像设备信息指向摄像设备配置所述抓拍策略,以使所述摄像设备按照所述抓拍策略进行人脸抓拍。
  16. 根据权利要求14所述的计算机可读存储介质,所述计算机程序被处理器执行时实现步骤还包括:
    识别人脸抓拍架构中当前运行的视频流抓拍服务实例的数量以及所述视频流抓拍服务实例当前控制的摄像设备数量;
    结合所述视频流抓拍服务实例的数量、所述视频流抓拍服务实例当前控制的摄像设备数量以及当次抓拍任务对应的摄像设备数量,计算出每个所述视频流抓拍服务实例对应连接的摄像设备的数量;
    根据计算出的每个所述视频流抓拍服务实例对应连接的摄像设备的数量,向所述视频流抓拍服务实例分配摄像设备并发送对应的摄像设备信息。
PCT/CN2020/135513 2020-09-22 2020-12-11 人脸抓拍架构及其人脸抓拍方法、装置、设备及存储介质 WO2021159842A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011004382.7A CN112132022B (zh) 2020-09-22 2020-09-22 人脸抓拍架构及其人脸抓拍方法、装置、设备及存储介质
CN202011004382.7 2020-09-22

Publications (1)

Publication Number Publication Date
WO2021159842A1 true WO2021159842A1 (zh) 2021-08-19

Family

ID=73842470

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/135513 WO2021159842A1 (zh) 2020-09-22 2020-12-11 人脸抓拍架构及其人脸抓拍方法、装置、设备及存储介质

Country Status (2)

Country Link
CN (1) CN112132022B (zh)
WO (1) WO2021159842A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114666555A (zh) * 2022-05-23 2022-06-24 创意信息技术股份有限公司 一种Edge边缘网关前端系统
CN116915786A (zh) * 2023-09-13 2023-10-20 杭州立方控股股份有限公司 一种多服务器协同的车牌识别及车辆管理系统

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113822177A (zh) * 2021-09-06 2021-12-21 苏州中科先进技术研究院有限公司 一种宠物脸关键点检测方法、装置、存储介质及设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105827976A (zh) * 2016-04-26 2016-08-03 北京博瑞空间科技发展有限公司 基于gpu的视频采集与处理装置及系统
CN110414305A (zh) * 2019-04-23 2019-11-05 苏州闪驰数控系统集成有限公司 人工智能卷积神经网络人脸识别系统
CN110457135A (zh) * 2019-08-09 2019-11-15 重庆紫光华山智安科技有限公司 一种资源调度方法、装置及共享gpu显存的方法
WO2019229213A1 (en) * 2018-06-01 2019-12-05 Canon Kabushiki Kaisha A load balancing method for video decoding in a system providing hardware and software decoding resources
CN110798702A (zh) * 2019-10-15 2020-02-14 平安科技(深圳)有限公司 视频解码方法、装置、设备及计算机可读存储介质

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8199196B2 (en) * 2007-09-27 2012-06-12 Alcatel Lucent Method and apparatus for controlling video streams
CN105120159B (zh) * 2015-08-26 2018-03-13 北京奇虎科技有限公司 通过远程控制获取图片的方法及服务器
CN106650589A (zh) * 2016-09-30 2017-05-10 北京旷视科技有限公司 实时人脸识别系统和方法
CN108351967A (zh) * 2017-12-28 2018-07-31 深圳市锐明技术股份有限公司 一种多人脸检测方法、装置、服务器、系统及存储介质
CN208271202U (zh) * 2018-06-05 2018-12-21 珠海芯桥科技有限公司 一种基于人脸识别的屏幕监控系统
CN111163259A (zh) * 2018-11-07 2020-05-15 杭州海康威视数字技术股份有限公司 一种图像抓拍方法、监控相机及监控系统
CN109447048B (zh) * 2018-12-25 2020-12-25 苏州闪驰数控系统集成有限公司 一种人工智能预警系统
CN109815839B (zh) * 2018-12-29 2021-10-08 深圳云天励飞技术有限公司 微服务架构下的徘徊人员识别方法及相关产品
CN109919069A (zh) * 2019-02-27 2019-06-21 浙江浩腾电子科技股份有限公司 基于深度学习的大型车辆分析系统
CN111385540A (zh) * 2020-04-17 2020-07-07 深圳市市政设计研究院有限公司 基于视频流分析技术的智慧市政基础设施管理系统

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105827976A (zh) * 2016-04-26 2016-08-03 北京博瑞空间科技发展有限公司 基于gpu的视频采集与处理装置及系统
WO2019229213A1 (en) * 2018-06-01 2019-12-05 Canon Kabushiki Kaisha A load balancing method for video decoding in a system providing hardware and software decoding resources
CN110414305A (zh) * 2019-04-23 2019-11-05 苏州闪驰数控系统集成有限公司 人工智能卷积神经网络人脸识别系统
CN110457135A (zh) * 2019-08-09 2019-11-15 重庆紫光华山智安科技有限公司 一种资源调度方法、装置及共享gpu显存的方法
CN110798702A (zh) * 2019-10-15 2020-02-14 平安科技(深圳)有限公司 视频解码方法、装置、设备及计算机可读存储介质

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114666555A (zh) * 2022-05-23 2022-06-24 创意信息技术股份有限公司 一种Edge边缘网关前端系统
CN114666555B (zh) * 2022-05-23 2023-03-24 创意信息技术股份有限公司 一种Edge边缘网关前端系统
CN116915786A (zh) * 2023-09-13 2023-10-20 杭州立方控股股份有限公司 一种多服务器协同的车牌识别及车辆管理系统
CN116915786B (zh) * 2023-09-13 2023-12-01 杭州立方控股股份有限公司 一种多服务器协同的车牌识别及车辆管理系统

Also Published As

Publication number Publication date
CN112132022B (zh) 2023-09-29
CN112132022A (zh) 2020-12-25

Similar Documents

Publication Publication Date Title
WO2021159842A1 (zh) 人脸抓拍架构及其人脸抓拍方法、装置、设备及存储介质
CN1744048B (zh) 摄像机共享
EP3244621B1 (en) Video encoding method, system and server
US10979492B2 (en) Methods and systems for load balancing
US20210209411A1 (en) Method for adjusting resource of intelligent analysis device and apparatus
CN102301664B (zh) 多核处理器的流分发方法及装置
CN103617062A (zh) 一种柔性的渲染集群动态部署系统与方法
CN112925737B (zh) Pci异构系统数据融合方法、系统、设备及存储介质
US20200019788A1 (en) Computer system, resource arrangement method thereof and image recognition method thereof
CN115150473A (zh) 一种资源调度方法、装置及存储介质
US10877811B1 (en) Scheduler for vector processing operator allocation
CN112817753A (zh) 任务的处理方法及装置、存储介质、电子装置
CN114513506A (zh) 业务处理方法、接入边缘云服务器及业务处理系统
JP7288547B2 (ja) リアルタイムデータを収集及び送信するシステム及び方法
US20190042294A1 (en) System and method for implementing virtualized network functions with a shared memory pool
US9826138B1 (en) Integration of transducer outputs in a conferencing system
WO2020143423A1 (zh) 视频流码率分配方法、装置及计算机可读存储介质
WO2020155913A1 (zh) 一种视频传输方法、装置、设备及存储介质
CN111147603A (zh) 一种推理服务网络化的方法及装置
CN115797228A (zh) 一种图像处理装置、方法、芯片、电子设备及存储介质
US10649666B1 (en) Link-list shortening logic
US20140327781A1 (en) Method for video surveillance, a related system, a related surveillance server, and a related surveillance camera
US9467661B2 (en) Method of operating camera, camera, and surveillance system having the same
KR102505909B1 (ko) 멀티채널 비디오 스트림의 실시간 객체 인식 장치
WO2022062799A1 (zh) 数据传输方法及相关装置

Legal Events

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

Ref document number: 20918622

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20918622

Country of ref document: EP

Kind code of ref document: A1