CN110472516B - A method, device, equipment and system for constructing a person image recognition system - Google Patents
A method, device, equipment and system for constructing a person image recognition system Download PDFInfo
- Publication number
- CN110472516B CN110472516B CN201910666702.6A CN201910666702A CN110472516B CN 110472516 B CN110472516 B CN 110472516B CN 201910666702 A CN201910666702 A CN 201910666702A CN 110472516 B CN110472516 B CN 110472516B
- Authority
- CN
- China
- Prior art keywords
- plug
- network model
- neural network
- character image
- ins
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 64
- 238000003062 neural network model Methods 0.000 claims abstract description 86
- 230000015654 memory Effects 0.000 claims description 35
- 238000004422 calculation algorithm Methods 0.000 claims description 26
- 238000001514 detection method Methods 0.000 claims description 25
- 238000012545 processing Methods 0.000 claims description 25
- 238000012544 monitoring process Methods 0.000 claims description 19
- 230000004927 fusion Effects 0.000 claims description 8
- 230000006870 function Effects 0.000 claims description 7
- 238000012549 training Methods 0.000 claims description 6
- 238000012790 confirmation Methods 0.000 claims description 3
- 238000010276 construction Methods 0.000 claims 1
- 238000011161 development Methods 0.000 abstract description 18
- 230000004044 response Effects 0.000 abstract description 7
- 230000008569 process Effects 0.000 description 21
- 230000018109 developmental process Effects 0.000 description 16
- 238000010586 diagram Methods 0.000 description 10
- 238000004891 communication Methods 0.000 description 7
- 238000005516 engineering process Methods 0.000 description 6
- 238000012360 testing method Methods 0.000 description 5
- 238000004458 analytical method Methods 0.000 description 4
- 238000013473 artificial intelligence Methods 0.000 description 4
- 230000005540 biological transmission Effects 0.000 description 4
- 239000000243 solution Substances 0.000 description 4
- 101100012902 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) FIG2 gene Proteins 0.000 description 3
- 238000012423 maintenance Methods 0.000 description 3
- 230000011218 segmentation Effects 0.000 description 3
- 210000000746 body region Anatomy 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 239000011521 glass Substances 0.000 description 2
- 238000004519 manufacturing process Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 101001121408 Homo sapiens L-amino-acid oxidase Proteins 0.000 description 1
- 101000827703 Homo sapiens Polyphosphoinositide phosphatase Proteins 0.000 description 1
- 102100026388 L-amino-acid oxidase Human genes 0.000 description 1
- 102100023591 Polyphosphoinositide phosphatase Human genes 0.000 description 1
- 101100233916 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) KAR5 gene Proteins 0.000 description 1
- 230000005856 abnormality Effects 0.000 description 1
- 238000007635 classification algorithm Methods 0.000 description 1
- 230000008878 coupling Effects 0.000 description 1
- 238000010168 coupling process Methods 0.000 description 1
- 238000005859 coupling reaction Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 230000001815 facial effect Effects 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 238000003709 image segmentation Methods 0.000 description 1
- 238000002347 injection Methods 0.000 description 1
- 239000007924 injection Substances 0.000 description 1
- 230000002452 interceptive effect Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 230000007935 neutral effect Effects 0.000 description 1
- 230000002085 persistent effect Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 238000013441 quality evaluation Methods 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000009469 supplementation Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44505—Configuring for program initiating, e.g. using registry, configuration files
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44521—Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
- G06F9/44526—Plug-ins; Add-ons
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/10—Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/10—Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
- G06V40/16—Human faces, e.g. facial parts, sketches or expressions
- G06V40/161—Detection; Localisation; Normalisation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/10—Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
- G06V40/16—Human faces, e.g. facial parts, sketches or expressions
- G06V40/172—Classification, e.g. identification
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Software Systems (AREA)
- General Physics & Mathematics (AREA)
- General Health & Medical Sciences (AREA)
- Health & Medical Sciences (AREA)
- General Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Human Computer Interaction (AREA)
- Biomedical Technology (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- Evolutionary Computation (AREA)
- Data Mining & Analysis (AREA)
- Mathematical Physics (AREA)
- Computational Linguistics (AREA)
- Biophysics (AREA)
- Oral & Maxillofacial Surgery (AREA)
- Artificial Intelligence (AREA)
- Life Sciences & Earth Sciences (AREA)
- Image Analysis (AREA)
Abstract
本发明公开了一种人物图像识别系统的构建方法、装置、设备及系统,所述方法包括:获取用于构建人物图像识别系统的基础框架;响应于接收到的插件加载指令,确定待加载插件,所述插件加载指令中携带有指向至少一个业务插件的配置参数;基于配置脚本和所述待加载插件的配置参数,生成用于构建所述人物图像识别系统的业务代码;融合所述业务代码与所述基础框架,以构建所述人物图像识别系统;其中,所述业务插件包括从图像获取插件、神经网络模型插件组成的群组中选择的至少一个,所述神经网络模型插件的配置参数指向至少一个用于人物图像识别的神经网络模型。能够大大提高开发人员的开发效率,可以满足不同业务场景的不同开发需求。
The present invention discloses a method, device, equipment and system for constructing a person image recognition system, the method comprising: obtaining a basic framework for constructing a person image recognition system; determining a plug-in to be loaded in response to a received plug-in loading instruction, wherein the plug-in loading instruction carries configuration parameters pointing to at least one business plug-in; generating a business code for constructing the person image recognition system based on a configuration script and the configuration parameters of the plug-in to be loaded; integrating the business code with the basic framework to construct the person image recognition system; wherein the business plug-in comprises at least one selected from a group consisting of an image acquisition plug-in and a neural network model plug-in, and the configuration parameters of the neural network model plug-in point to at least one neural network model for person image recognition. The development efficiency of developers can be greatly improved, and different development requirements of different business scenarios can be met.
Description
技术领域Technical Field
本发明涉及互联网通信技术领域,尤其涉及一种人物图像识别系统的构建方法、装置、设备及系统。The present invention relates to the field of Internet communication technology, and in particular to a method, device, equipment and system for constructing a person image recognition system.
背景技术Background Art
人工智能(Artificial Intelligence,AI),是研究、开发用于模拟、延伸和扩展人的智能的理论、方法、技术及应用系统的一门新的技术科学。随着人工智能技术研究和进步,人工智能技术在多个领域展开研究和应用。Artificial Intelligence (AI) is a new technical science that studies and develops theories, methods, technologies and application systems for simulating, extending and expanding human intelligence. With the research and progress of artificial intelligence technology, artificial intelligence technology has been studied and applied in many fields.
现有的在线系统往往都基于某类型应用场景,针对每个不同类型的应用场景,往往需要编写不同的业务代码。甚至对于某类型应用场景下的各个细分业务场景,也针对每个细分业务场景的不同需求,分别建立代码库以搭建该在线系统。比如,业务场景1和业务场景2中业务流程相同或相近,就业务场景中类型模块的重复开发会带来较大的开发及维护成本。因此,对于具有相同或相近的业务流程的在线系统的开发,需要提供更有效的方案,降低代码开发成本和维护开销。Existing online systems are often based on a certain type of application scenario, and different business codes often need to be written for each different type of application scenario. Even for each segmented business scenario under a certain type of application scenario, a code library is established to build the online system according to the different needs of each segmented business scenario. For example, if the business processes in business scenario 1 and business scenario 2 are the same or similar, the repeated development of the same type of modules in the business scenario will bring about high development and maintenance costs. Therefore, for the development of online systems with the same or similar business processes, a more effective solution needs to be provided to reduce code development costs and maintenance expenses.
发明内容Summary of the invention
为了解决现有技术应用在对具有相同或相近的业务流程的在线系统进行开发时,效率低、成本高等问题,本发明提供了一种人物图像识别系统的构建方法、装置、设备及系统:In order to solve the problems of low efficiency and high cost in the development of online systems with the same or similar business processes in the existing technology, the present invention provides a method, device, equipment and system for constructing a person image recognition system:
一方面,本发明提供了一种人物图像识别系统的构建方法,所述方法包括:In one aspect, the present invention provides a method for constructing a person image recognition system, the method comprising:
获取用于构建人物图像识别系统的基础框架;Get the basic framework for building a person image recognition system;
响应于接收到的插件加载指令,确定待加载插件,所述插件加载指令中携带有指向至少一个业务插件的配置参数;In response to a received plug-in loading instruction, determining a plug-in to be loaded, wherein the plug-in loading instruction carries configuration parameters pointing to at least one service plug-in;
基于配置脚本和所述待加载插件的配置参数,生成用于构建所述人物图像识别系统的业务代码;Based on the configuration script and the configuration parameters of the plug-in to be loaded, generating a business code for building the person image recognition system;
融合所述业务代码与所述基础框架,以构建所述人物图像识别系统;Integrate the business code with the basic framework to build the character image recognition system;
其中,所述业务插件包括从图像获取插件、神经网络模型插件组成的群组中选择的至少一个,所述神经网络模型插件的配置参数指向至少一个用于人物图像识别的神经网络模型。The business plug-in includes at least one selected from the group consisting of an image acquisition plug-in and a neural network model plug-in, and the configuration parameters of the neural network model plug-in point to at least one neural network model for character image recognition.
另一方面提供了一种人物图像识别系统的构建装置,所述装置包括:On the other hand, a device for constructing a person image recognition system is provided, the device comprising:
基础框架获取模块:用于获取用于构建人物图像识别系统的基础框架;Basic framework acquisition module: used to obtain the basic framework for building a person image recognition system;
待加载插件确认模块:用于响应于接收到的插件加载指令,确定待加载插件,所述插件加载指令中携带有指向至少一个业务插件的配置参数;A plug-in confirmation module to be loaded: used to determine a plug-in to be loaded in response to a received plug-in loading instruction, wherein the plug-in loading instruction carries configuration parameters pointing to at least one business plug-in;
业务代码生成模块:用于基于配置脚本和所述待加载插件的配置参数,生成用于构建所述人物图像识别系统的业务代码;A business code generation module: used to generate business codes for constructing the person image recognition system based on a configuration script and configuration parameters of the plug-in to be loaded;
融合模块:用于融合所述业务代码与所述基础框架,以构建所述人物图像识别系统;Fusion module: used to fuse the business code with the basic framework to build the character image recognition system;
其中,所述业务插件包括从图像获取插件、神经网络模型插件组成的群组中选择的至少一个,所述神经网络模型插件的配置参数指向至少一个用于人物图像识别的神经网络模型。The business plug-in includes at least one selected from the group consisting of an image acquisition plug-in and a neural network model plug-in, and the configuration parameters of the neural network model plug-in point to at least one neural network model for character image recognition.
另一方面提供了一种电子设备,所述电子设备包括处理器和存储器,所述存储器中存储有至少一条指令、至少一段程序、代码集或指令集,所述至少一条指令、所述至少一段程序、所述代码集或指令集由所述处理器加载并执行以实现如上述的人物图像识别系统的构建方法。On the other hand, an electronic device is provided, which includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the method for constructing a person image recognition system as described above.
另一方面提供了一种计算机可读存储介质,所述存储介质中存储有至少一条指令、至少一段程序、代码集或指令集,所述至少一条指令、所述至少一段程序、所述代码集或指令集由处理器加载并执行以实现如上述的人物图像识别系统的构建方法。On the other hand, a computer-readable storage medium is provided, in which at least one instruction, at least one program, a code set or an instruction set is stored. The at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by a processor to implement the method for constructing a character image recognition system as described above.
本发明提供的一种人物图像识别系统的构建方法、装置、设备及系统,具有如下技术效果:The present invention provides a method, device, equipment and system for constructing a person image recognition system, which has the following technical effects:
本发明应用于开发人物图像识别系统。能够大大提高开发人员的开发效率,可以满足不同业务场景的不同开发需求。插件的形式,能够减少重复开发的工作量,同时也便于维护。The present invention is applied to the development of a person image recognition system. It can greatly improve the development efficiency of developers and meet different development requirements of different business scenarios. In the form of a plug-in, it can reduce the workload of repeated development and facilitate maintenance.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
为了更清楚地说明本发明实施例或现有技术中的技术方案和优点,下面将对实施例或现有技术描述中所需要使用的附图作简单的介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它附图。In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
图1是本发明实施例提供的一种应用环境的示意图;FIG1 is a schematic diagram of an application environment provided by an embodiment of the present invention;
图2是本发明实施例提供的一种人物图像识别系统的构建方法的流程示意图;FIG2 is a flow chart of a method for constructing a person image recognition system provided by an embodiment of the present invention;
图3是本发明实施例提供的应用于小型智慧商店业务场景的对应系统的业务流程示意图;3 is a schematic diagram of a business process of a corresponding system applied to a small smart store business scenario provided by an embodiment of the present invention;
图4是本发明实施例提供的应用于大型智慧商场业务场景的对应系统的业务流程示意图;4 is a schematic diagram of a business process of a corresponding system applied to a large-scale smart shopping mall business scenario provided by an embodiment of the present invention;
图5是本发明实施例提供的对人物图像识别系统进行插件更新以及使用的一种流程示意图;5 is a schematic diagram of a flow chart of updating and using a plug-in for a person image recognition system provided by an embodiment of the present invention;
图6是本发明实施例提供的人物图像识别系统的一种业务流程示意图;6 is a schematic diagram of a business process of a person image recognition system provided by an embodiment of the present invention;
图7也是本发明实施例提供的人物图像识别系统的一种业务流程示意图;FIG. 7 is also a schematic diagram of a business process of a person image recognition system provided by an embodiment of the present invention;
图9是本发明实施例提供的一种人物图像识别系统的构建装置的组成框图;9 is a block diagram of a device for constructing a person image recognition system provided by an embodiment of the present invention;
图10是本发明实施例提供的一种电子设备的结构示意图。FIG. 10 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention.
具体实施方式DETAILED DESCRIPTION
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动的前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
需要说明的是,本发明的说明书和权利要求书及上述附图中的术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或服务器不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。It should be noted that the terms "including" and "having" and any variations thereof in the specification and claims of the present invention and the above-mentioned drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
请参阅图1,图1是本发明实施例提供的一种应用环境的示意图,可以包括客户端01和服务器02,客户端与服务器通过网络连接。用户通过客户端将人物图像发送至服务器,服务器对接收到的人物图像进行识别。需要说明的是,图1仅仅是一种示例。Please refer to FIG. 1, which is a schematic diagram of an application environment provided by an embodiment of the present invention, and may include a client 01 and a server 02, wherein the client and the server are connected via a network. A user sends a person image to the server via the client, and the server recognizes the received person image. It should be noted that FIG. 1 is only an example.
具体的,客户端01可以包括智能手机、台式电脑、平板电脑、笔记本电脑、数字助理、智能可穿戴设备等类型的实体设备,也可以包括运行于实体设备中的软体,例如一些服务商提供给用户的网页页面,也可以为该些服务商提供给用户的应用。Specifically, the client 01 may include physical devices such as smart phones, desktop computers, tablet computers, laptops, digital assistants, smart wearable devices, etc., and may also include software running in physical devices, such as web pages provided to users by some service providers, or applications provided to users by these service providers.
具体的,本说明书实施例中,所述服务器02可以包括一个独立运行的服务器,或者分布式服务器,或者由多个服务器组成的服务器集群。服务器02可以包括有网络通信单元、处理器和存储器等等。Specifically, in the embodiments of this specification, the server 02 may include an independently operated server, or a distributed server, or a server cluster composed of multiple servers. The server 02 may include a network communication unit, a processor, a memory, and the like.
需要说明的是,对于与用户信息存在关联关系的人物图像等,当本申请实施例运用到具体产品或技术中时,需要获得用户许可或者同意,且相关数据的收集、使用和处理需要遵守相关国家和地区的相关法律法规和标准。It should be noted that for character images that are associated with user information, when the embodiments of the present application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.
以下介绍本发明一种人物图像识别系统的构建方法的具体实施例,图2是本发明实施例提供的一种人物图像识别系统的构建方法的流程示意图,本说明书提供了如实施例或流程图所述的方法操作步骤,但基于常规或者无创造性的劳动可以包括更多或者更少的操作步骤。实施例中列举的步骤顺序仅仅为众多步骤执行顺序中的一种方式,不代表唯一的执行顺序。在实际中的系统或服务器产品执行时,可以按照实施例或者附图所示的方法顺序执行或者并行执行(例如并行处理器或者多线程处理的环境)。具体的如图2所示,所述方法可以包括:The following introduces a specific embodiment of a method for constructing a person image recognition system of the present invention. FIG2 is a flow chart of a method for constructing a person image recognition system provided by an embodiment of the present invention. This specification provides method operation steps as described in the embodiment or flow chart, but more or fewer operation steps may be included based on conventional or non-creative labor. The order of steps listed in the embodiment is only one way of executing the order of many steps and does not represent the only execution order. When the actual system or server product is executed, it can be executed in sequence or in parallel according to the method shown in the embodiment or the accompanying drawings (for example, a parallel processor or a multi-threaded processing environment). Specifically, as shown in FIG2, the method may include:
S201:获取用于构建人物图像识别系统的基础框架;S201: Acquire a basic framework for building a person image recognition system;
在本发明实施例中,应用于某类型应用场景下的人物图像识别系统往往具有相同或相近的业务流程。比如,当应用于需要进行人物图像识别的智慧门店应用场景下时,图3所示的功能模块为针对小型智慧商店业务场景而设置的,图4所示的功能模块为针对大型智慧商场业务场景而设置的。由图3、4可知,两种业务场景具有相同或相近的业务流程:视频输入设备(硬件模块)——》图像获取模块(用于从视频输入设备取流)——》算法模块(用于识别获取的图像)——》存储模块——》辅助模块(比如用于处理日志、进行监控等)。其中,相比于针对小型商店业务场景而设置的功能模块,针对大型商场业务场景而设置的功能模块中,硬件模块中设置的摄像头类型更多,以及算法模块中对图像进行识别的维度更多。In an embodiment of the present invention, a character image recognition system applied to a certain type of application scenario often has the same or similar business processes. For example, when applied to a smart store application scenario where character image recognition is required, the functional module shown in FIG3 is set for a small smart store business scenario, and the functional module shown in FIG4 is set for a large smart shopping mall business scenario. As can be seen from FIGS. 3 and 4, the two business scenarios have the same or similar business processes: video input device (hardware module) -> image acquisition module (used to obtain a stream from the video input device) -> algorithm module (used to identify the acquired image) -> storage module -> auxiliary module (such as for processing logs, monitoring, etc.). Among them, compared with the functional modules set for small store business scenarios, the functional modules set for large shopping mall business scenarios have more camera types set in the hardware modules, and more dimensions for image recognition in the algorithm modules.
考虑到应用于某类型应用场景下的人物图像识别系统具有的相同或相近的业务流程,可以设置对应的基础框架,所述基础框架可以为构建的针对具体业务场景的人物图像识别系统提供基础代码库、公共类库、基础服务接口等。获取用于构建人物图像识别系统的基础框架,可以在一定程度上降低重复开发会带来较大的开发成本。比如,对于如3、4所示的业务场景,可以不再需要从零开始开发图像获取模块。Considering the same or similar business processes of the person image recognition system applied to a certain type of application scenario, a corresponding basic framework can be set up, which can provide a basic code library, a public class library, a basic service interface, etc. for the person image recognition system built for a specific business scenario. Obtaining the basic framework for building a person image recognition system can reduce the large development costs caused by repeated development to a certain extent. For example, for the business scenarios shown in 3 and 4, it is no longer necessary to develop an image acquisition module from scratch.
当然,需要进行人物图像识别的应用场景不限于智慧门店(商店、商场),还可以为智慧零售、智慧社区等。Of course, application scenarios that require character image recognition are not limited to smart stores (stores, shopping malls), but can also be smart retail, smart communities, etc.
S202:响应于接收到的插件加载指令,确定待加载插件,所述插件加载指令中携带有指向至少一个业务插件的配置参数;S202: Determine a plug-in to be loaded in response to a received plug-in loading instruction, wherein the plug-in loading instruction carries configuration parameters pointing to at least one service plug-in;
在本发明实施例中,所述业务插件为对应用于实现人物图像识别系统的业务流程的功能模块设置。所述业务插件可以包括图像获取插件、神经网络模型插件组成的群组中选择的至少一个。根据插件加载指令中至少一个业务插件的配置参数,可以确定某一业务插件是否需要加载。可以结合业务场景的具体需求,更细粒度的选择需要加载的业务插件。In an embodiment of the present invention, the business plug-in is a functional module setting corresponding to the business process for implementing the person image recognition system. The business plug-in may include at least one selected from the group consisting of an image acquisition plug-in and a neural network model plug-in. According to the configuration parameters of at least one business plug-in in the plug-in loading instruction, it can be determined whether a certain business plug-in needs to be loaded. The business plug-in that needs to be loaded can be selected in a more fine-grained manner in combination with the specific needs of the business scenario.
在一个具体的实施例中,神经网络模型插件对应算法模块,所述神经网络模型插件的配置参数指向至少一个用于人物图像识别的神经网络模型。用于人物图像识别的神经网络模型可以为用于人脸检测、人体检测、人体跟踪、人头体绑定、人脸质量分、姿态检测等的神经网络模型。在实际应用中,某智慧门店可以基于构建的人物图像识别系统对到店的用户进行人物图像识别,用户在智慧门店内的活动可以由视频输入设备(比如摄像头)进行拍摄,神经网络模型插件可以对前述拍摄采集到的原始图像进行人物图像识别。In a specific embodiment, the neural network model plug-in corresponds to an algorithm module, and the configuration parameters of the neural network model plug-in point to at least one neural network model for character image recognition. The neural network model for character image recognition can be a neural network model for face detection, body detection, body tracking, head-body binding, face quality score, posture detection, etc. In actual applications, a smart store can perform character image recognition on users who come to the store based on the constructed character image recognition system. The user's activities in the smart store can be captured by a video input device (such as a camera), and the neural network model plug-in can perform character image recognition on the original images captured by the aforementioned shooting.
通过人脸检测对应的神经网络模型可以确定原始图像中是否含有人脸;若有人脸,可以将人脸区域从原始图像中裁剪出来,也可与返回人脸区域的位置、大小和人脸属性分析结果。进一步的,所述人脸属性分析结果可以包括性别、表情(中性、微笑、大笑)、年龄(误差估计小于5岁)、是否佩戴眼镜(普通眼镜、墨镜)、是否佩戴帽子、是否佩戴口罩等。The neural network model corresponding to face detection can determine whether the original image contains a face; if there is a face, the face area can be cropped from the original image, and the position, size and face attribute analysis results of the face area can also be returned. Furthermore, the face attribute analysis results can include gender, expression (neutral, smiling, laughing), age (error estimated to be less than 5 years old), whether wearing glasses (ordinary glasses, sunglasses), whether wearing a hat, whether wearing a mask, etc.
通过人体检测对应的神经网络模型可以确定原始图像中是否含有人体;若有人体,可以将人体区域从原始图像中裁剪出来,也可与返回人体区域的位置、大小和人体属性分析结果。进一步的,所述人体属性分析结果可以包括性别、身高、体重等。The neural network model corresponding to human body detection can determine whether the original image contains a human body; if a human body is present, the human body region can be cropped from the original image, and the position, size and human body attribute analysis results of the human body region can also be returned. Furthermore, the human body attribute analysis results may include gender, height, weight, etc.
通过人体跟踪对应的神经网络模型可以根据监控时间段内多个摄像头拍摄到的针对用户A的原始图像,确定用户A在该监控时间段内的运动轨迹。比如,用户A和其他5个用户一起在智慧门店内走动,位于智慧门店不同位置的5个摄像头有拍到用户A和其他5个用户的原始图像。基于上述来自5个摄像头的原始图像,可以确定用户A(从6个用户中定位出来)在监控时间段内的运动轨迹。The neural network model corresponding to human body tracking can determine the movement trajectory of user A during the monitoring period based on the original images of user A captured by multiple cameras during the monitoring period. For example, user A and five other users are walking in a smart store together, and five cameras located at different locations in the smart store have captured original images of user A and the other five users. Based on the original images from the five cameras, the movement trajectory of user A (located from the six users) during the monitoring period can be determined.
通过人头体绑定对应的神经网络模型可以基于人体检测的识别结果,将获取到的仅有人脸的原始图像(或者仅有躯干+四肢的原始图像)与对应的躯干+四肢参考图像(或者人脸参考图像)进行绑定。比如,用户B在智慧门店内走动,某一摄像头对用户B进行拍摄时,采集到的原始图像可能没有指向用户B脸部的人脸区域,可以将原始图像中的身体区域分割出来与对应的人脸参考图像(对应用户B)作绑定,得到指向用户B的识别结果。Through the binding of the head and body to the corresponding neural network model, the original image of only the face (or the original image of only the torso + limbs) can be bound to the corresponding torso + limbs reference image (or face reference image) based on the recognition result of human body detection. For example, when user B walks in a smart store and a camera takes a picture of user B, the original image collected may not point to the face area of user B's face. The body area in the original image can be segmented out and bound to the corresponding face reference image (corresponding to user B) to obtain the recognition result pointing to user B.
通过人脸质量分对应的神经网络模型可以根据质量评估因素(比如图像的模糊情况、图像中目标区域受遮挡的情况等)对原始图像进行质量分评估,进而可以将评估达到质量分阈值的图像用于进行人脸检测、人体检测、人脸聚类(用于将一个图像集合内的各个人脸区域根据身份进行分组)、人脸检索(比如基于原始图像的人脸区域,和已有人脸库中的N个人脸图像进行比对,找出最相似的一张脸或多张脸,并给出相似度排序)等。比如,由于摄像头设置于智慧门店的不同位置,不同摄像头的拍摄角度也不同。位于位置甲的用户C可能受到多个摄像头的拍摄,其中一些摄像头采集到的原始图像可能受限于角度,这样抓拍到用户C的原始图像对应的分数较低。若此时用户C作出摇头动作,抓拍到用户C的原始图像中可能存在较模糊的图像,可以将这些质量分较低的原始图像作过滤处理。The neural network model corresponding to the face quality score can evaluate the quality score of the original image according to the quality evaluation factors (such as the blur of the image, the occlusion of the target area in the image, etc.), and then the image that reaches the quality score threshold can be used for face detection, human body detection, face clustering (used to group the various face areas in an image set according to identity), face retrieval (for example, based on the face area of the original image, compare with N face images in the existing face library, find the most similar face or faces, and give a similarity ranking), etc. For example, since the cameras are set at different locations in the smart store, the shooting angles of different cameras are also different. User C at position A may be photographed by multiple cameras, and the original images captured by some cameras may be limited by angles, so the scores corresponding to the original images of user C are low. If user C shakes his head at this time, there may be blurry images in the original images of user C captured, and these original images with lower quality scores can be filtered.
通过姿态检测对应的神经网络模型可以确定原始图像中人脸姿态或者人体姿态是否满足预设的标准姿态,比如确认是否拍到某用户正脸面对对应的摄像头。The corresponding neural network model of posture detection can determine whether the facial posture or body posture in the original image meets the preset standard posture, for example, confirm whether a user is photographed facing the corresponding camera.
在实际应用中,可以根据应用场景的需求等,选择神经网络模型插件配置的神经网络模型(对应的功能、相互间的设置顺序、使用的具体算法等)。比如可以选择一个用作分割器的第一神经网络模型和一个用作分类器的第二神经网络模型。在使用时,可以设置原始图像先输入第一神经网络模型进行分割得到目标图像,再将目标图像输入第二神经网络模型进行分类得到识别结果。具体的,所述第一神经网络模型可以基于MaskRCNN(实例分割算法)进行图像分割,MaskRCNN很好的结合了FPN(Feature Pyramid Networks,特征金字塔网络算法)/RPN(RegionProposal Network,区域候选网络算法)/Classification(分类算法)/Detection(检测算法)的特性,适合作图像的检测与分割。所述第一神经网络模型中的基础网络可以选用残差网络ResNet101,以兼顾速度与准确率。所述第二神经网络模型中的基础网络可以选用Inception(一种网络模型结构)-ResNet(残差网络)-V2。当然,对于神经网络模型插件中神经网络模型的配置不局限于上述,可以兼顾性能因素进行配置。In practical applications, the neural network model configured by the neural network model plug-in (corresponding functions, mutual setting order, specific algorithms used, etc.) can be selected according to the needs of the application scenario. For example, a first neural network model used as a segmenter and a second neural network model used as a classifier can be selected. When in use, the original image can be set to be first input into the first neural network model for segmentation to obtain the target image, and then the target image can be input into the second neural network model for classification to obtain the recognition result. Specifically, the first neural network model can perform image segmentation based on MaskRCNN (instance segmentation algorithm). MaskRCNN combines the characteristics of FPN (Feature Pyramid Networks, Feature Pyramid Network Algorithm)/RPN (Region Proposal Network, Region Candidate Network Algorithm)/Classification (Classification Algorithm)/Detection (Detection Algorithm) well, and is suitable for image detection and segmentation. The basic network in the first neural network model can use the residual network ResNet101 to take into account both speed and accuracy. The basic network in the second neural network model can use Inception (a network model structure)-ResNet (residual network)-V2. Of course, the configuration of the neural network model in the neural network model plug-in is not limited to the above, and can be configured taking performance factors into consideration.
另一个具体的实施例中,所述业务插件还可以包括从日志处理插件、监控插件组成的群组中选择的至少一个,所述日志处理插件用于处理所述人物图像识别系统生成的日志,所述监控插件用于监控所述人物图像识别系统的运行状态。In another specific embodiment, the business plug-in may also include at least one selected from the group consisting of a log processing plug-in and a monitoring plug-in, wherein the log processing plug-in is used to process the log generated by the character image recognition system, and the monitoring plug-in is used to monitor the operating status of the character image recognition system.
所述日志处理插件对应的日志处理模块可以采用分布式管理,比如采用分布式数据库集群的形式,如图8所示,本说明书实施例中分布式数据库集群还可以包括区块链网络对应的分布式数据库集群,可以包括分布式节点801、808、803、804、805和806。各个分布式节点之间可以通过通信链路进行连接,比如可以通过有线通信链路或无线通信链路进行连接等。The log processing module corresponding to the log processing plug-in can be managed in a distributed manner, such as in the form of a distributed database cluster. As shown in FIG8 , the distributed database cluster in the embodiment of this specification can also include a distributed database cluster corresponding to the blockchain network, which can include distributed nodes 801, 808, 803, 804, 805, and 806. The distributed nodes can be connected via a communication link, such as a wired communication link or a wireless communication link.
所述监控插件对应的监控模块可以在检测到某一监控对象的监控指标满足报警规则中的报警条件时,进行报警并向开发人员展示报警信息,所述报警信息包括所述监控指标的信息和不同于所述监控指标的关联指标的信息。可以有效定位发生异常的位置和时间,进而解决问题。监控对象的的设置时分插件的,甚至就某个插件内的功能单元作进一步设置。The monitoring module corresponding to the monitoring plug-in can issue an alarm and display the alarm information to the developer when it detects that the monitoring indicator of a certain monitoring object meets the alarm condition in the alarm rule. The alarm information includes the information of the monitoring indicator and the information of the associated indicator different from the monitoring indicator. The location and time of the abnormality can be effectively located, and the problem can be solved. The setting of the monitoring object is divided into plug-ins, and even further settings can be made for the functional units in a plug-in.
S203:基于配置脚本和所述待加载插件的配置参数,生成用于构建所述人物图像识别系统的业务代码;S203: Generate a business code for constructing the person image recognition system based on the configuration script and the configuration parameters of the plug-in to be loaded;
在本发明实施例中,配置脚本可以为一SHELL脚本(利用shell的功能所写的一个程序;shell,命令解析器)。通过SHELL脚本,输入需要的参数(所述待加载插件的配置参数),可以用于构建所述人物图像识别系统的业务代码。比如:In the embodiment of the present invention, the configuration script may be a SHELL script (a program written using the functions of a shell; shell is a command parser). Through the SHELL script, the required parameters (configuration parameters of the plug-in to be loaded) are input, which can be used to construct the business code of the person image recognition system. For example:
“→Desktop bash generator.sh"→Desktop bash generator.sh
开始生成,请按提示输入参数Start generating, please enter parameters as prompted
请输入项目名称:testPlease enter the project name: test
是否使用软解码,输入true/false,默认为true:trueWhether to use soft decoding, enter true/false, the default is true: true
选择需要加载的插件Select the plugin you want to load
1.人脸检测1. Face Detection
2.人脸质量分2. Face quality score
3.人体检测3. Human body detection
4.人体跟踪4. Human body tracking
5.人头体绑定5. Human head and body binding
6.姿态检测6. Posture detection
以空格分割:1 2 3 4 5 6Split by space: 1 2 3 4 5 6
是否需要日志处理插件,输入true/false,默认为false:falseWhether a log processing plug-in is required, enter true/false, the default is false: false
是否需要监控插件,输入true/false,默认为true:trueWhether to need monitoring plug-in, enter true/false, the default is true: true
开始加载...Loading...
生成基础代码...Generate base code...
加载算法模块...Loading algorithm module...
加载边缘模块...Loading edge modules...
生成完成”Generation completed"
这样以插件的形式集成人物图像识别业务流程中的各功能模块,图像获取模块、算法模块以及辅助模块等可以分别独立发布,互不干扰,保证单个模块的更新不影响整体业务逻辑,便于管理和维护。In this way, the various functional modules in the character image recognition business process are integrated in the form of plug-ins. The image acquisition module, algorithm module and auxiliary module can be released independently without interfering with each other, ensuring that the update of a single module does not affect the overall business logic, which is easy to manage and maintain.
S204:融合所述业务代码与所述基础框架,以构建所述人物图像识别系统;S204: integrating the business code with the basic framework to construct the person image recognition system;
在本发明实施例中,可以将所述业务代码注入所述基础框架中,进而得到所述人物图像识别系统。具体的,可以根据基础框架中配置的代码注入规则,将所述业务代码注入所述基础框架中,得到融合代码;对所述融合代码进行编译,得到可执行代码,并运行所述可执行代码,以实现所述人物图像识别系统的在线应用。开发人员可以不再需要编写基础框架对应的代码,能够减少开发中的编写大量重复代码及其相关调试、测试等引发的工作量,开发人员只需要关注具体业务场景对应的业务逻辑本身。In an embodiment of the present invention, the business code can be injected into the basic framework to obtain the person image recognition system. Specifically, according to the code injection rules configured in the basic framework, the business code can be injected into the basic framework to obtain a fusion code; the fusion code is compiled to obtain an executable code, and the executable code is run to implement the online application of the person image recognition system. Developers no longer need to write the code corresponding to the basic framework, which can reduce the workload caused by writing a large amount of repeated code and related debugging, testing, etc. in the development process. Developers only need to focus on the business logic itself corresponding to the specific business scenario.
在一个具体的实施例中,如图5所示,当所述待加载插件包括所述神经网络模型插件时,所述融合所述业务代码与所述基础框架,以构建所述人物图像识别系统,包括:In a specific embodiment, as shown in FIG5 , when the plug-in to be loaded includes the neural network model plug-in, the fusion of the business code and the basic framework to construct the person image recognition system includes:
S501:响应于接收到的插件更新指令,确定所述神经网络模型插件对应的初始网络模型,以及获取人物样本图像;S501: In response to the received plug-in update instruction, determining an initial network model corresponding to the neural network model plug-in, and acquiring a sample image of a person;
根据插件更新指令,可以确定所述初始网络模型为用于人脸检测的神经网络模型和/或用于人体检测的神经网络模型。相应的,获取人物样本图像。According to the plug-in update instruction, the initial network model can be determined to be a neural network model for face detection and/or a neural network model for body detection. Accordingly, a sample image of a person is obtained.
S502:基于所述人物样本图像,训练所述初始网络模型,得到目标网络模型;S502: Based on the person sample image, training the initial network model to obtain a target network model;
可以基于人物样本图像,训练所述初始网络模型,得到中间网络模型;再将已标注测试图像输入所述中间网络模型进行预测,得到所述测试图像对应的预测结果;接着,基于所述测试图像,根据对应的预测结果和标注标识之间的差异,调整所述中间网络模型对应的模型参数至所述差异对应的损失值被收敛至预设阈值,以得到所述目标网络模型。The initial network model can be trained based on sample images of people to obtain an intermediate network model; then the labeled test image is input into the intermediate network model for prediction to obtain the prediction result corresponding to the test image; then, based on the test image, according to the difference between the corresponding prediction result and the labeled mark, the model parameters corresponding to the intermediate network model are adjusted until the loss value corresponding to the difference converges to a preset threshold, so as to obtain the target network model.
S503:基于所述目标网络模型,更新所述神经网络模型插件。S503: Based on the target network model, update the neural network model plug-in.
更新所述神经网络模型插件,可以使得对应的算法模块对于应用场景的需求适应性更好。以插件的形式集成人物图像识别业务流程中的各功能模块,在更新时模块间的耦合性和依赖性较低,更便于维护。当然,也可以对图像获取插件、日志处理插件、监控插件等作对应的参数调整以更新。各个插件的更新也可以同步进行,相互间的影响程度低。对于各个插件的更新不局限于对预设的基础组件的参数调整等,还包括对对应的基础组件进行修改、补充等。Updating the neural network model plug-in can make the corresponding algorithm module more adaptable to the needs of the application scenario. Integrating the various functional modules in the character image recognition business process in the form of plug-ins has low coupling and dependence between modules during updates, which is easier to maintain. Of course, corresponding parameter adjustments can also be made to the image acquisition plug-in, log processing plug-in, monitoring plug-in, etc. for updating. The updates of each plug-in can also be carried out synchronously, with a low degree of mutual influence. The update of each plug-in is not limited to the parameter adjustment of the preset basic components, etc., but also includes modification and supplementation of the corresponding basic components.
在另一个具体的实施例中,如图5所示,当所述待加载插件包括所述图像获取插件和所述神经网络模型插件时,所述融合所述业务代码与所述基础框架,以构建所述人物图像识别系统,还包括:In another specific embodiment, as shown in FIG5 , when the plug-in to be loaded includes the image acquisition plug-in and the neural network model plug-in, the fusion of the business code and the basic framework to construct the person image recognition system further includes:
S601:基于所述图像获取插件,获取所述待处理人物图像;S601: Based on the image acquisition plug-in, the person image to be processed is acquired;
在实际应用中,如图6、7所示,可以从视频输入设备(比如球机、枪机、AI摄像头)获取原始视频流;对所述原始视频流进行解码处理,得到视频帧,所述视频帧包括至少一个所述待处理人物图像。图像获取插件对应的图像获取模块可以从摄像头中拉取原始视频流,并进行解码得到视频帧,进而将视频帧输入神经网络模型插件对应的算法模块中进行处理。在算法模块中进行的人物图像识别过程可以包括分别进行的人脸检测、人脸质量分计算、人体检测,识别结果可以存入数据库中进行持久化存储。In practical applications, as shown in Figures 6 and 7, the original video stream can be obtained from a video input device (such as a ball camera, a gun camera, an AI camera); the original video stream is decoded to obtain a video frame, and the video frame includes at least one of the image of the person to be processed. The image acquisition module corresponding to the image acquisition plug-in can pull the original video stream from the camera, decode it to obtain a video frame, and then input the video frame into the algorithm module corresponding to the neural network model plug-in for processing. The character image recognition process performed in the algorithm module may include face detection, face quality score calculation, and human body detection, and the recognition results can be stored in a database for persistent storage.
S602:基于所述神经网络模型插件,分别将所述待处理人物图像输入各个所述神经网络模型进行识别,以得到所述待处理人物图像对应的各个识别结果。S602: Based on the neural network model plug-in, the image of the person to be processed is input into each of the neural network models for recognition, so as to obtain each recognition result corresponding to the image of the person to be processed.
对于不同业务场景,可能需要在所述神经网络模型插件对应算法模块中组合指向不同人物图像识别功能的神经网络模型。如图6、7所示,本说明书实施例提出了定制算法流水线的概念,以更高的灵活度支持不同的业务逻辑。可以将人脸检测、人脸质量过滤、人脸检测、人脸相似度匹配这4个算法模块组合起来,将对应的神经网络模型组合指向的算法模块定义为人脸识别流水线。基于定制算法流水线,可以只关注最后的输出结果,不在意中间过程,类似于将多个神经网络模型组合成一个函数,给定输入,得到输出。算法模块才采用GPU(Graphics Processing Unit,图形处理器)进行计算处理,基于定制算法流水线,对应的神经网络模型组合在使用时只需要将对应数据拷贝一次至显存,而非对于用到的每个神经网络模型都进行一次数据拷贝,能够极大的提高运行效率,同时节约显存资源、提高性能。其中,所述人物图像识别系统运行的硬件环境可以是搭载于含有GPU的X86服务器。For different business scenarios, it may be necessary to combine neural network models pointing to different person image recognition functions in the algorithm module corresponding to the neural network model plug-in. As shown in Figures 6 and 7, the embodiment of this specification proposes the concept of a customized algorithm pipeline to support different business logics with higher flexibility. The four algorithm modules of face detection, face quality filtering, face detection, and face similarity matching can be combined, and the algorithm module pointed to by the corresponding neural network model combination is defined as a face recognition pipeline. Based on the customized algorithm pipeline, you can only focus on the final output result and ignore the intermediate process, which is similar to combining multiple neural network models into a function, giving input and getting output. The algorithm module uses GPU (Graphics Processing Unit) for calculation and processing. Based on the customized algorithm pipeline, the corresponding neural network model combination only needs to copy the corresponding data to the video memory once when in use, rather than copying the data once for each neural network model used, which can greatly improve the operating efficiency, while saving video memory resources and improving performance. Among them, the hardware environment for the operation of the person image recognition system can be an X86 server equipped with a GPU.
进一步的,图像获取插件对应的图像获取模块可以创建数据写入线程,所述数据写入线程对应一共享内存队列;通过所述数据写入线程将所述待处理人物图像对应的数据(比如原始数据帧)写入所述共享内存队列。相应的,神经网络模型插件对应的算法模块可以创建数据读取线程,所述数据读取线程对应所述共享内存队列;通过所述数据读取线程从所述共享内存队列中读取所述待处理人物图像对应的数据(比如原始数据帧);进而将所述待处理人物图像输入各个所述神经网络模型模型进行识别,以得到所述待处理人物图像对应的各个识别结果。通过共享内存队列的方式进行通信,可以保证图像获取模块与算法模块的更新不会相互影响。Furthermore, the image acquisition module corresponding to the image acquisition plug-in can create a data writing thread, and the data writing thread corresponds to a shared memory queue; the data corresponding to the image of the person to be processed (such as the original data frame) is written into the shared memory queue through the data writing thread. Correspondingly, the algorithm module corresponding to the neural network model plug-in can create a data reading thread, and the data reading thread corresponds to the shared memory queue; the data corresponding to the image of the person to be processed (such as the original data frame) is read from the shared memory queue through the data reading thread; and then the image of the person to be processed is input into each of the neural network models for recognition, so as to obtain each recognition result corresponding to the image of the person to be processed. Communicating by means of a shared memory queue can ensure that the updates of the image acquisition module and the algorithm module will not affect each other.
数据写入线程将原始数据帧写入队列,写入队列中的数据可以是基于时序的,也可以是基于不同视频输入设备分类设置的(比如摄像头设置有对应的识别标识,位于智慧门店入口处的摄像头1-3对应识别标识A,位于智慧门店的收银处的摄像头7-12对应识别标识D)。相应的,数据读取线程,可以根据根据不同的维度从队列中读取数据。比如可以根据时间或者图像数量等维度来进行分批统一处理,提高运算效率。共享内存队列的存在,允许图像获取模块的生产速度和算法模块的消费速度的曲线图有尖刺。例如某个时刻,图像获取模块生产过快,由于队列的存在,数据也不会马上丢失,算法模块可以慢慢跟上图像获取模块的生产速度,这样输入神经网络模型的数据可以更为平滑。The data writing thread writes the original data frame into the queue. The data written into the queue can be based on time sequence or based on the classification settings of different video input devices (for example, the camera is set with a corresponding identification mark, and the cameras 1-3 located at the entrance of the smart store correspond to the identification mark A, and the cameras 7-12 located at the cashier of the smart store correspond to the identification mark D). Correspondingly, the data reading thread can read data from the queue according to different dimensions. For example, batches can be processed uniformly according to dimensions such as time or number of images to improve computing efficiency. The existence of a shared memory queue allows the curve graph of the production speed of the image acquisition module and the consumption speed of the algorithm module to have spikes. For example, at a certain moment, the image acquisition module produces too fast. Due to the existence of the queue, the data will not be lost immediately. The algorithm module can slowly keep up with the production speed of the image acquisition module, so that the data input into the neural network model can be smoother.
由以上本说明书实施例提供的技术方案可见,本说明书实施例应用于开发人物图像识别系统。以插件的形式集成人物图像识别业务流程中的各功能模块,基于配置脚本和待加载插件的配置参数,生成用于构建所述人物图像识别系统的业务代码。融合基础框架与业务代码,构建得到人物图像识别系统。能够大大提高开发人员的开发效率,可以满足不同业务场景的不同开发需求。插件的形式,能够减少重复开发的工作量,同时也便于维护。It can be seen from the technical solutions provided in the above embodiments of this specification that the embodiments of this specification are applied to the development of a person image recognition system. The functional modules in the person image recognition business process are integrated in the form of plug-ins, and the business code for building the person image recognition system is generated based on the configuration script and the configuration parameters of the plug-in to be loaded. The basic framework and the business code are integrated to construct a person image recognition system. It can greatly improve the development efficiency of developers and meet the different development needs of different business scenarios. The form of a plug-in can reduce the workload of repeated development and is also easy to maintain.
本发明实施例还提供了一种人物图像识别系统的构建装置,如图9所示,所述装置包括:The embodiment of the present invention further provides a device for constructing a person image recognition system, as shown in FIG9 , the device includes:
基础框架获取模块910:用于获取用于构建人物图像识别系统的基础框架;Basic framework acquisition module 910: used to acquire a basic framework for building a person image recognition system;
待加载插件确认模块920:用于响应于接收到的插件加载指令,确定待加载插件,所述插件加载指令中携带有指向至少一个业务插件的配置参数;The plug-in confirmation module 920 to be loaded is used to determine the plug-in to be loaded in response to the received plug-in loading instruction, wherein the plug-in loading instruction carries configuration parameters pointing to at least one business plug-in;
业务代码生成模块930:用于基于配置脚本和所述待加载插件的配置参数,生成用于构建所述人物图像识别系统的业务代码;Business code generation module 930: used to generate business code for building the person image recognition system based on the configuration script and the configuration parameters of the plug-in to be loaded;
融合模块940:用于融合所述业务代码与所述基础框架,以构建所述人物图像识别系统;Fusion module 940: used to fuse the business code with the basic framework to construct the person image recognition system;
其中,所述业务插件包括从图像获取插件、神经网络模型插件组成的群组中选择的至少一个,所述神经网络模型插件的配置参数指向至少一个用于人物图像识别的神经网络模型。The business plug-in includes at least one selected from the group consisting of an image acquisition plug-in and a neural network model plug-in, and the configuration parameters of the neural network model plug-in point to at least one neural network model for character image recognition.
在一个具体的实施例中,当所述待加载插件包括所述神经网络模型插件时,所述融合模块940包括:In a specific embodiment, when the plug-in to be loaded includes the neural network model plug-in, the fusion module 940 includes:
插件更新指令接收单元:用于响应于接收到的插件更新指令,确定所述神经网络模型插件对应的初始网络模型,以及获取人物样本图像;A plug-in update instruction receiving unit: used to determine the initial network model corresponding to the neural network model plug-in in response to the received plug-in update instruction, and obtain a sample image of a person;
模型训练单元:用于基于所述人物样本图像,训练所述初始网络模型,得到目标网络模型;Model training unit: used for training the initial network model based on the person sample image to obtain a target network model;
插件更新单元:用于基于所述目标网络模型,更新所述神经网络模型插件。Plug-in updating unit: used to update the neural network model plug-in based on the target network model.
需要说明的,所述装置实施例中的装置与方法实施例基于同样的发明构思。It should be noted that the device in the device embodiment and the method embodiment are based on the same inventive concept.
本发明实施例提供了一种电子设备,该电子设备包括处理器和存储器,该存储器中存储有至少一条指令、至少一段程序、代码集或指令集,该至少一条指令、该至少一段程序、该代码集或指令集由该处理器加载并执行以实现如上述方法实施例所提供的人物图像识别系统的构建方法。An embodiment of the present invention provides an electronic device, which includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement a method for constructing a person image recognition system as provided in the above method embodiment.
进一步地,图10示出了一种用于实现本发明实施例所提供的人物图像识别系统的构建方法的电子设备的硬件结构示意图,所述设备可以参与构成或包含本发明实施例所提供的装置。如图10所示,设备100可以包括一个或多个(图中采用1002a、1002b,……,1002n来示出)处理器1002(处理器1002可以包括但不限于微处理器MCU或可编程逻辑器件FPGA等的处理装置)、用于存储数据的存储器1004、以及用于通信功能的传输装置1006。除此以外,还可以包括:显示器、输入/输出接口(I/O接口)、通用串行总线(USB)端口(可以作为I/O接口的端口中的一个端口被包括)、网络接口、电源和/或相机。本领域普通技术人员可以理解,图10所示的结构仅为示意,其并不对上述电子装置的结构造成限定。例如,电子设备100还可包括比图10中所示更多或者更少的组件,或者具有与图10所示不同的配置。Further, FIG. 10 shows a hardware structure diagram of an electronic device for implementing a method for constructing a person image recognition system provided by an embodiment of the present invention, and the device may participate in or include the device provided by an embodiment of the present invention. As shown in FIG. 10 , the device 100 may include one or more (1002a, 1002b, ..., 1002n are used in the figure to illustrate) processors 1002 (the processor 1002 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 1004 for storing data, and a transmission device 1006 for communication functions. In addition, it may also include: a display, an input/output interface (I/O interface), a universal serial bus (USB) port (which may be included as one of the ports of the I/O interface), a network interface, a power supply and/or a camera. It can be understood by those skilled in the art that the structure shown in FIG. 10 is only for illustration, and it does not limit the structure of the above-mentioned electronic device. For example, the electronic device 100 may also include more or fewer components than those shown in FIG. 10 , or have a configuration different from that shown in FIG. 10 .
应当注意到的是上述一个或多个处理器1002和/或其他数据处理电路在本文中通常可以被称为“数据处理电路”。该数据处理电路可以全部或部分的体现为软件、硬件、固件或其他任意组合。此外,数据处理电路可为单个独立的处理模块,或全部或部分的结合到电子设备100(或移动设备)中的其他元件中的任意一个内。如本申请实施例中所涉及到的,该数据处理电路作为一种处理器控制(例如与接口连接的可变电阻终端路径的选择)。It should be noted that the one or more processors 1002 and/or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the electronic device 100 (or mobile device). As described in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).
存储器1004可用于存储应用软件的软件程序以及模块,如本发明实施例中所述的方法对应的程序指令/数据存储装置,处理器1002通过运行存储在存储器104内的软件程序以及模块,从而执行各种功能应用以及数据处理,即实现上述的一种人物图像识别系统的构建方法。存储器1004可包括高速随机存储器,还可包括非易失性存储器,如一个或者多个磁性存储装置、闪存、或者其他非易失性固态存储器。在一些实例中,存储器1004可进一步包括相对于处理器1002远程设置的存储器,这些远程存储器可以通过网络连接至电子设备100。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。The memory 1004 can be used to store software programs and modules of application software, such as program instructions/data storage devices corresponding to the method in the embodiment of the present invention. The processor 1002 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, to implement the above-mentioned method for constructing a person image recognition system. The memory 1004 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 1004 may further include a memory remotely arranged relative to the processor 1002, and these remote memories may be connected to the electronic device 100 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
传输装置1006用于经由一个网络接收或者发送数据。上述的网络具体实例可包括电子设备100的通信供应商提供的无线网络。在一个实例中,传输装置1006包括一个网络适配器(NetworkInterfaceController,NIC),其可通过基站与其他网络设备相连从而可与互联网进行通讯。在一个实例中,传输装置1006可以为射频(RadioFrequency,RF)模块,其用于通过无线方式与互联网进行通讯。The transmission device 1006 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the electronic device 100. In one example, the transmission device 1006 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 1006 can be a radio frequency (Radio Frequency, RF) module, which is used to communicate with the Internet wirelessly.
显示器可以例如触摸屏式的液晶显示器(LCD),该液晶显示器可使得用户能够与电子设备100(或移动设备)的用户界面进行交互。The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the electronic device 100 (or mobile device).
本发明的实施例还提供了一种存储介质,所述存储介质可设置于电子设备之中以保存用于实现方法实施例中一种人物图像识别系统的构建方法相关的至少一条指令、至少一段程序、代码集或指令集,该至少一条指令、该至少一段程序、该代码集或指令集由该处理器加载并执行以实现上述方法实施例提供的人物图像识别系统的构建方法。An embodiment of the present invention also provides a storage medium, which can be set in an electronic device to store at least one instruction, at least one program, a code set or an instruction set related to a method for constructing a person image recognition system in a method embodiment. The at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the method for constructing a person image recognition system provided in the above method embodiment.
可选地,在本实施例中,上述存储介质可以位于计算机网络的多个网络服务器中的至少一个网络服务器。可选地,在本实施例中,上述存储介质可以包括但不限于:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。Optionally, in this embodiment, the storage medium may be located in at least one of the multiple network servers of the computer network. Optionally, in this embodiment, the storage medium may include, but is not limited to, various media that can store program codes, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.
需要说明的是:上述本发明实施例先后顺序仅仅为了描述,不代表实施例的优劣。且上述对本说明书特定实施例进行了描述。其它实施例在所附权利要求书的范围内。在一些情况下,在权利要求书中记载的动作或步骤可以按照不同于实施例中的顺序来执行并且仍然可以实现期望的结果。另外,在附图中描绘的过程不一定要求示出的特定顺序或者连续顺序才能实现期望的结果。在某些实施方式中,多任务处理和并行处理也是可以的或者可能是有利的。It should be noted that the sequence of the embodiments of the present invention described above is for description only and does not represent the advantages and disadvantages of the embodiments. The above describes specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于装置和电子设备实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device and electronic device embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
以上所述仅为本发明的较佳实施例,并不用以限制本发明,凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims (12)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910666702.6A CN110472516B (en) | 2019-07-23 | 2019-07-23 | A method, device, equipment and system for constructing a person image recognition system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910666702.6A CN110472516B (en) | 2019-07-23 | 2019-07-23 | A method, device, equipment and system for constructing a person image recognition system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110472516A CN110472516A (en) | 2019-11-19 |
CN110472516B true CN110472516B (en) | 2024-10-18 |
Family
ID=68509778
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910666702.6A Active CN110472516B (en) | 2019-07-23 | 2019-07-23 | A method, device, equipment and system for constructing a person image recognition system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110472516B (en) |
Families Citing this family (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112861575A (en) * | 2019-11-27 | 2021-05-28 | 中兴通讯股份有限公司 | Pedestrian structuring method, device, equipment and storage medium |
CN111290800A (en) * | 2020-02-11 | 2020-06-16 | 深圳壹账通智能科技有限公司 | A face image recognition method and device |
CN113391810B (en) * | 2020-03-11 | 2025-03-07 | 北京灵汐科技有限公司 | A parsing method and system based on application scenario graph |
CN111368803A (en) * | 2020-03-28 | 2020-07-03 | 河南工业职业技术学院 | A face recognition method and system |
CN113542796B (en) * | 2020-04-22 | 2023-08-08 | 腾讯科技(深圳)有限公司 | Video evaluation method, device, computer equipment and storage medium |
CN111552524B (en) * | 2020-05-06 | 2023-10-13 | Oppo(重庆)智能科技有限公司 | Plug-in loading method and device and computer readable storage medium |
CN111611065B (en) * | 2020-05-29 | 2023-08-11 | 远光软件股份有限公司 | Calling method and device of machine learning algorithm, storage medium and electronic equipment |
CN112001230B (en) * | 2020-07-09 | 2024-07-30 | 浙江大华技术股份有限公司 | Sleep behavior monitoring method and device, computer equipment and readable storage medium |
CN113204336A (en) * | 2021-05-21 | 2021-08-03 | 珠海金山网络游戏科技有限公司 | Game platform creating method and device |
CN113807257A (en) * | 2021-09-17 | 2021-12-17 | 深圳市商汤科技有限公司 | Method, device and equipment for generating algorithm application element and computer readable storage medium |
CN114281433A (en) * | 2021-11-27 | 2022-04-05 | 浙江大华技术股份有限公司 | Algorithm and rule calling method, image processing method, device and storage medium |
CN114531603B (en) * | 2022-02-10 | 2024-03-22 | 广联达科技股份有限公司 | Image processing method and system for video stream and electronic equipment |
CN114723265A (en) * | 2022-03-30 | 2022-07-08 | 国泰新点软件股份有限公司 | Bid evaluation business system and method |
CN118840778B (en) * | 2024-09-24 | 2024-12-03 | 四川省寰宇众恒科技有限公司 | Face recognition algorithm and smart hat sticker based on face recognition and positioning detection |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103297381A (en) * | 2012-02-22 | 2013-09-11 | 阿里巴巴集团控股有限公司 | Service access method based on plugin and system thereof |
CN107301377A (en) * | 2017-05-26 | 2017-10-27 | 浙江大学 | A kind of face based on depth camera and pedestrian's sensory perceptual system |
CN108416440A (en) * | 2018-03-20 | 2018-08-17 | 上海未来伙伴机器人有限公司 | A kind of training method of neural network, object identification method and device |
CN108694083A (en) * | 2017-04-07 | 2018-10-23 | 腾讯科技(深圳)有限公司 | A kind of data processing method and device of server |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8510283B2 (en) * | 2006-07-31 | 2013-08-13 | Ricoh Co., Ltd. | Automatic adaption of an image recognition system to image capture devices |
US8176210B2 (en) * | 2006-11-22 | 2012-05-08 | Ricoh Company, Ltd. | Unified host application and associated methodology of integrating local service of a multi-function printer |
CN107358232B (en) * | 2017-06-28 | 2020-12-29 | 中山大学新华学院 | Invoice identification method based on plug-in |
US10635409B2 (en) * | 2018-01-15 | 2020-04-28 | Cognizant Technology Solutions India Pvt. Ltd. | System and method for improving software code quality using artificial intelligence techniques |
-
2019
- 2019-07-23 CN CN201910666702.6A patent/CN110472516B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103297381A (en) * | 2012-02-22 | 2013-09-11 | 阿里巴巴集团控股有限公司 | Service access method based on plugin and system thereof |
CN108694083A (en) * | 2017-04-07 | 2018-10-23 | 腾讯科技(深圳)有限公司 | A kind of data processing method and device of server |
CN107301377A (en) * | 2017-05-26 | 2017-10-27 | 浙江大学 | A kind of face based on depth camera and pedestrian's sensory perceptual system |
CN108416440A (en) * | 2018-03-20 | 2018-08-17 | 上海未来伙伴机器人有限公司 | A kind of training method of neural network, object identification method and device |
Also Published As
Publication number | Publication date |
---|---|
CN110472516A (en) | 2019-11-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110472516B (en) | A method, device, equipment and system for constructing a person image recognition system | |
US20190392587A1 (en) | System for predicting articulated object feature location | |
CN110866469B (en) | Facial five sense organs identification method, device, equipment and medium | |
WO2020078119A1 (en) | Method, device and system for simulating user wearing clothing and accessories | |
CN116188392B (en) | Image processing method, computer readable storage medium and computer terminal | |
US11450010B2 (en) | Repetition counting and classification of movements systems and methods | |
Thong Huynh et al. | Engagement intensity prediction withfacial behavior features | |
Zhu et al. | Egoobjects: A large-scale egocentric dataset for fine-grained object understanding | |
CN106471440A (en) | Eye tracking based on efficient forest sensing | |
Shen et al. | Facial image-to-video translation by a hidden affine transformation | |
Li et al. | Visual large language models for generalized and specialized applications | |
CN114187392A (en) | Virtual even image generation method and device and electronic equipment | |
Miao et al. | Referring human pose and mask estimation in the wild | |
CN113761281B (en) | Virtual resource processing method, device, medium and electronic equipment | |
Sánchez et al. | Facial expression recognition via transfer learning in cooperative game paradigms for enhanced social AI | |
KR102531719B1 (en) | Apparatus and method for providing service of sharing and recommendation short-form contents for children | |
Delabrida et al. | Towards a wearable device for monitoring ecological environments | |
CN118608888A (en) | Training method, device, equipment, medium and program product of liveness detection model | |
CN114449323B (en) | Video generation method and electronic device | |
Aravindan et al. | A Smart Assistive System for Visually Impaired to Inform Acquaintance Using Image Processing (ML) Supported by IoT | |
CN117011449A (en) | Reconstruction method and device of three-dimensional face model, storage medium and electronic equipment | |
Zhang et al. | Automatic construction and extraction of sports moment feature variables using artificial intelligence | |
Ortmann et al. | EmojiHeroVR: A study on facial expression recognition under partial occlusion from head-mounted displays | |
CN110942033B (en) | Method, device, electronic equipment and computer medium for pushing information | |
CN113486717A (en) | A method and device for behavior recognition |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TG01 | Patent term adjustment | ||
TG01 | Patent term adjustment |