WO2021159634A1 - 基于分类回归双域模型的流量识别方法和系统 - Google Patents

基于分类回归双域模型的流量识别方法和系统 Download PDF

Info

Publication number
WO2021159634A1
WO2021159634A1 PCT/CN2020/093034 CN2020093034W WO2021159634A1 WO 2021159634 A1 WO2021159634 A1 WO 2021159634A1 CN 2020093034 W CN2020093034 W CN 2020093034W WO 2021159634 A1 WO2021159634 A1 WO 2021159634A1
Authority
WO
WIPO (PCT)
Prior art keywords
target
classification
picture
value
regression
Prior art date
Application number
PCT/CN2020/093034
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 WO2021159634A1 publication Critical patent/WO2021159634A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/50Context or environment of the image
    • G06V20/52Surveillance or monitoring of activities, e.g. for recognising suspicious objects
    • G06V20/53Recognition of crowd images, e.g. recognition of crowd congestion
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/18Complex mathematical operations for evaluating statistical data, e.g. average values, frequency distributions, probability functions, regression analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2415Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on parametric or probabilistic models, e.g. based on likelihood ratio or false acceptance rate versus a false rejection rate
    • 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
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/10Internal combustion engine [ICE] based vehicles
    • Y02T10/40Engine management systems

Definitions

  • the embodiments of the present application relate to the field of artificial intelligence, and in particular to a method, system, computer device, and computer-readable storage medium for traffic identification based on a classification regression dual-domain model.
  • an embodiment of the present application provides a traffic identification method based on a classification regression dual-domain model, and the method steps include:
  • the target picture is input to a classification regression dual-domain model, and the target classification value and target regression value of the target picture are output through the classification regression dual-domain model, wherein the classification dual-domain model includes a pre-trained classifier And a pre-trained regressor, where both the classifier and the regressor are used to identify the traffic in the target picture;
  • an embodiment of the present application also provides a traffic identification system based on a classification regression dual-domain model, including:
  • the collection module is used to collect the target picture in the preset area
  • the input module is configured to input the target picture into a classification regression dual-domain model, and output the target classification value and target regression value of the target picture through the classification regression dual-domain model, wherein the classification dual-domain model includes pre- A trained classifier and a pre-trained regressor, both the classifier and the regressor are used to identify the traffic in the target picture;
  • the judgment module is used to judge whether the target classification value is greater than a preset classification value
  • the output module is configured to output the traffic recognition result based on the target regression value when the target classification value is greater than the preset classification value; when the target classification value is not greater than the preset classification value, output based on the target classification value The flow identification result.
  • an embodiment of the present application also provides a computer device, the computer device including a memory, a processor, and computer-readable instructions stored in the memory and running on the processor, the When the computer-readable instructions are executed by the processor, the following steps are implemented:
  • the target picture is input to a classification regression dual-domain model, and the target classification value and target regression value of the target picture are output through the classification regression dual-domain model, wherein the classification dual-domain model includes a pre-trained classifier And a pre-trained regressor, where both the classifier and the regressor are used to identify the traffic in the target picture;
  • embodiments of the present application also provide a computer-readable storage medium having computer-readable instructions stored in the computer-readable storage medium, and the computer-readable instructions may be executed by at least one processor, So that the at least one processor executes the following steps:
  • the target picture is input to a classification regression dual-domain model, and the target classification value and target regression value of the target picture are output through the classification regression dual-domain model, wherein the classification dual-domain model includes a pre-trained classifier And a pre-trained regressor, where both the classifier and the regressor are used to identify the traffic in the target picture;
  • the traffic identification method, system, computer equipment, and computer-readable storage medium based on the classification regression dual-domain model provided by the embodiments of this application provide effective prediction and identification methods for individuals and the number of individuals appearing in pictures;
  • the combination of classifier and regressor enables the model to accurately identify the number of individuals in complex scenarios.
  • FIG. 1 is a schematic flowchart of a traffic identification method based on a classification regression dual-domain model according to an embodiment of the application.
  • Embodiment 2 is a schematic diagram of program modules of Embodiment 2 of a traffic identification system based on a classification regression dual-domain model according to the present application.
  • FIG. 3 is a schematic diagram of the hardware structure of the third embodiment of the computer equipment of this application.
  • the computer device 2 will be used as the execution subject for exemplary description.
  • FIG. 1 shows a flow chart of the flow identification method based on the classification regression dual-domain model of the embodiment of the present application. It can be understood that the flowchart in this method embodiment is not used to limit the order of execution of the steps.
  • the following exemplarily describes the computer device 2 as the execution subject. details as follows.
  • Step S100 Collect a target picture in a preset area.
  • the target picture may be collected by a picture collecting device, and the preset area may be a large shopping mall, a street, a road, a subway, a parking lot, a scenic spot, or other venues for activities, etc., for example, a camera at a subway entrance may be used. Take a picture of the subway entrance.
  • Step S102 Input the target picture into a classification regression dual-domain model, and output the target classification value and target regression value of the target picture through the classification regression dual-domain model, wherein the classification dual-domain model includes pre-trained And a pre-trained regressor, both of which are used to identify the traffic in the target picture.
  • the target classification value and the target regression value may both be a numerical value, which is used to represent the number of individuals in the target picture.
  • the regression dual-domain model is used to The images of the subway entrance taken by the subway entrance are identified, and the target classification value and target regression value are obtained.
  • step S102 may further include:
  • step S102a1 the target picture is classified by the classifier to obtain multiple confidence levels corresponding to the target picture.
  • each confidence level is used to indicate the probability that the target picture belongs to one of the preset multiple picture categories.
  • each picture can be classified according to the number of individuals in the picture and a preset threshold. Pictures with the same number of individuals are classified into one category, where the threshold is the largest that can be recognized by the classifier while ensuring recognition accuracy.
  • the value of individual identification For example, when the preset threshold is 10, the pictures may be divided into 12 picture categories, and the 12 picture categories may include a picture category with 0 individuals and 1 to 10 pictures with 10 individuals. The category and the number of an individual are more than 10 picture categories, so the target picture is classified by the classifier to obtain 12 confidence levels corresponding to the target picture, and each confidence level is for one picture category.
  • the classifier can use the MSE function to predict the picture category of the subway entrance picture to obtain multiple probabilities corresponding to the subway entrance picture, where each The probability corresponds to a picture category.
  • Step S102a2 Determine the target picture category of the target picture according to the picture category corresponding to the highest confidence level among the multiple confidence levels.
  • the largest probability among the multiple probabilities is selected, and the picture category corresponding to the largest probability is used as the first picture category of the subway entrance picture.
  • Step S102a3 Determine a target classification value of the target picture according to the target picture category of the subway entrance picture, and the target classification value is used to indicate the number of individuals in the target picture.
  • the number of individuals in the subway entrance image is determined according to the value corresponding to the first picture category, and the value of the number of individuals is used as the target classification value.
  • step S102 may further include:
  • step S102b1 a regression process is performed on the target picture by a regressor to obtain a numerical value corresponding to the number of individuals in the target picture.
  • the cross-entropy function can be used in the regression to predict the number of individuals in the large shopping mall picture to obtain a specific value of the number of individuals in the large shopping mall picture.
  • Step S102b2 performing integerization processing on the value to obtain an integer value, and determining the integer value as the target regression value.
  • the specific value of the number of individuals in the large shopping mall picture is processed to obtain an integer value, that is, non-integer numbers are rounded to obtain an integer value, and the integer value is used as the target regression value.
  • Step S104 Determine whether the target classification value is greater than the preset classification value; when the target classification value is greater than the preset classification value, output the traffic recognition result based on the target regression value; when the target classification value is not greater than the preset classification value; If the classification value is set, the traffic recognition result is output based on the target classification value.
  • the traffic recognition result may be the number of individuals in the preset area; for example, it may be the number of passengers at the entrance of the subway, the number of tourists at the entrance of the scenic spot, the number of guests at the entrance of a large event venue, and the number of vehicles at the entrance of a parking lot.
  • the preset classification value may be a threshold of the preset classification value, the threshold may be a fixed value, and the configuration of the value may be based on the number of categories that can be recognized by the classifier; wherein, the number of categories that can be recognized by the classifier It can be adjusted according to the recognition effect (recognition accuracy and recognition efficiency) of the classifier and regressor; for example, when the number of individuals in the preset area is not more than 20, the predictive effect of the classifier is better than that of the regressor, and when the number of individuals in the preset area When the number of individuals is greater than 20, the predictive effect of the regressor is better than that of the classifier, and the value can be set to 20.
  • the number of recognizable categories of the classifier can be 22.
  • the maximum number of individuals that can be recognized by the classifier is 20, that is, a picture whose number of individuals in a picture is 0 is subtracted.
  • Category and a picture category with more than 20 individuals in a picture, so the value can be configured as 20.
  • Case 1 When the target classification value is not greater than 20, the target classification value is used as the traffic recognition result; it is not difficult to understand, that is, when the target classification value is not greater than 20, the result obtained by the classifier is compared with the regression The result obtained by the filter is more accurate, so the target classification value is used as the flow identification result.
  • the traffic identification method based on the classification regression dual-domain model further includes: sending the traffic identification result to a target device, so that the target device performs a corresponding operation according to the traffic identification result; or The flow identification result generates a corresponding operation instruction to control the target device to perform a corresponding operation through the operation instruction.
  • the target device may be an automatic valve in a public place, such as an automatic valve at the entrance of a parking lot, an automatic valve at an entrance of a subway, an automatic valve at an entrance of a scenic spot, and an automatic valve at an entrance of a large-scale event venue. Control the opening and closing operations of the automatic valve according to the flow identification result and the automatic valve preset operation command.
  • the traffic identification method based on the classification regression dual-domain model may further include training steps S200 to S208 of the classifier:
  • Step S200 Obtain an initial classifier.
  • the initial classifier may be an initial deep convolutional neural network model that can be used as a classifier.
  • Step S202 Obtain multiple initial classification pictures, and each initial classification picture is assigned a first number label indicating the number of individuals.
  • the plurality of initial classification pictures are obtained from an existing database; it is also possible to obtain a plurality of pictures through an image acquisition device such as a camera, and then assign a first number label indicating the number of individuals to each picture.
  • an image acquisition device such as a camera
  • assign a first number label indicating the number of individuals to each picture to get multiple initial classification pictures.
  • multiple pictures can also be images taken by a certain camera, or video frames.
  • the cameras can be surveillance cameras in subway stations, surveillance cameras at entrances to scenic spots, surveillance cameras in underground parking lots, and large Surveillance cameras at the entrance of the event venue, etc.
  • Step S204 according to the first number of labels corresponding to each initial classification picture, divide the plurality of initial classification pictures into N+2 picture categories and configure corresponding picture category labels, where N is a positive integer, so
  • the N+2 picture categories include a picture category where the number of individuals is 0, the number of N individuals is N picture categories, and the number of individuals is more than N picture categories.
  • the predictive effect of the classifier is better than that of the regressor
  • the predictive effect of the regressor is better than that of the classifier, namely ,
  • the classifier can recognize that the maximum picture category is N in the preset area.
  • Step S206 Configure multiple classification training samples according to the initial classification pictures corresponding to the respective picture category tags.
  • an initial classification picture carrying a picture category label is used as a classification training sample to obtain multiple classification training samples.
  • Step S208 Train the initial classifier through the multiple classification training samples to obtain a trained classifier.
  • the deep convolutional neural network model that can be used as a classifier is trained through the multiple classification training samples until the model converges to obtain the classifier.
  • the initial classifier uses a cross entropy function as the classification objective function, and the cross entropy function:
  • N represents the number of training samples
  • w is the network parameter
  • p and q represent the prediction probability and training experience probability, respectively
  • y represents the training label value. Represents the predicted value of the model.
  • the traffic identification method based on the classification regression dual-domain model may further include training steps S300 to S306 of the regressor:
  • step S300 an initial regressor is obtained.
  • the initial regressor may be an initial deep convolutional neural network model that can be used as a regressor.
  • Step S302 Obtain multiple initial regression pictures, and each initial regression picture is assigned a second number label indicating the number of individuals.
  • the multiple initial regression pictures are obtained from an existing database; it is also possible to obtain multiple pictures through an image acquisition device such as a camera, and then assign a first number label indicating the number of individuals to each picture, To get multiple initial regression pictures.
  • multiple pictures can also be images taken by a certain camera, or video frames.
  • the cameras can be surveillance cameras in subway stations, surveillance cameras at entrances to scenic spots, surveillance cameras in underground parking lots, and large Surveillance cameras at the entrance of the event venue, etc.
  • Step S304 Configure multiple regression training samples according to the initial regression pictures corresponding to each of the second number of labels.
  • the initial regression picture carrying the second number of labels is used as the regression training sample to obtain multiple regression training samples.
  • Step S306 Train the initial regressor through the multiple regression training samples to obtain a trained regressor.
  • the deep convolutional neural network model that can be used as a regressor is trained through the multiple regression training samples until the model converges to obtain the regressor.
  • the initial regressor uses an MSE (Mean Square Error) function as the regression objective function, and the MSE function:
  • n represents the number of training samples
  • y i represents the actual value
  • Embodiment 2 is a schematic diagram of program modules of Embodiment 2 of a traffic identification system based on a classification regression dual-domain model according to the present application.
  • the traffic recognition system 20 based on the classification regression dual-domain model may include or be divided into one or more program modules, and the one or more program modules are stored in a storage medium and executed by one or more processors to complete
  • This application can implement the above-mentioned traffic identification method based on the classification regression dual-domain model.
  • the program module referred to in the embodiments of the present application refers to a series of computer program instruction segments capable of completing specific functions, and is more suitable than the program itself to describe the execution process of the traffic recognition system 20 based on the classification regression dual-domain model in the storage medium. The following description will specifically introduce the functions of each program module in this embodiment:
  • the collection module 200 is used to collect a target picture in a preset area.
  • the input module 202 is configured to input the target picture into a classification regression dual-domain model, and output the target classification value and target regression value of the target picture through the classification regression dual-domain model, wherein the classification dual-domain model includes A pre-trained classifier and a pre-trained regressor, the classifier and the regressor are both used to identify the traffic in the target picture.
  • the classification dual-domain model includes A pre-trained classifier and a pre-trained regressor, the classifier and the regressor are both used to identify the traffic in the target picture.
  • the input module 202 is further configured to: perform classification processing on the target picture by the classifier to obtain multiple confidence levels corresponding to the target picture, and each confidence level is used to represent The probability that the target picture belongs to one of the preset multiple picture categories; determine the target picture category of the target picture according to the picture category corresponding to the highest confidence level among the multiple confidence levels; The target picture category determines the target classification value of the target picture, and the target classification value is used to indicate the number of individuals in the target picture.
  • the input module 202 is further configured to: perform regression processing on the target picture through a regressor to obtain a numerical value corresponding to the number of individuals in the target picture; and perform integer processing on the numerical value to obtain an integer And determine the integer value as the target regression value.
  • the judging module 204 is used to judge whether the target classification value is greater than a preset classification value.
  • the output module 206 is configured to output a traffic recognition result based on the target regression value when the target classification value is greater than the preset classification value; when the target classification value is not greater than the preset classification value, then based on the target classification value Output the flow identification result. It is used to determine whether the classification value is greater than a preset classification value.
  • the traffic identification system 20 based on the classification regression dual-domain model further includes: a sending module 208, and the sending module 208 is configured to send the traffic identification result to the target device, so that the target device Perform a corresponding operation according to the flow identification result; or generate a corresponding operation instruction according to the flow identification result, so as to control the target device to perform a corresponding operation through the operation instruction.
  • the traffic recognition system 20 based on the classification regression dual-domain model further includes: a training module 210, the training module 210 is configured to: obtain an initial classifier; and obtain a plurality of initial classification pictures, each of the initial classification pictures Allocate a first quantity label indicating the number of individuals; according to the first quantity label corresponding to each initial classification picture, divide the plurality of initial classification pictures into N+2 picture categories and configure the corresponding picture category labels , Where N is a positive integer, and the N+2 picture categories include a picture category with a number of individuals of 0, a picture category with N individuals with a number of N picture categories, and a picture category with a number of individuals greater than N; corresponding to each picture category label
  • the initial classification picture is configured with a plurality of classification training samples; and the initial classifier is trained through the plurality of classification training samples to obtain a trained classifier.
  • the training module 210 is further configured to: obtain an initial regressor; obtain a plurality of initial regression pictures, and each initial regression picture is assigned a second quantity label indicating the number of individuals; according to each of the second quantity labels
  • the corresponding initial regression picture is configured with multiple regression training samples; and the initial regressor is trained through the multiple regression training samples to obtain a trained regressor.
  • the computer device 2 is a device that can automatically perform numerical calculation and/or information processing according to pre-set or stored instructions.
  • the computer device 2 may be a rack server, a blade server, a tower server, or a cabinet server (including an independent server or a server cluster composed of multiple servers).
  • the computer device 2 at least includes, but is not limited to, a memory 21, a processor 22, a network interface 23, and a traffic recognition system 20 based on a classification regression dual-domain model that can communicate with each other through a system bus.
  • the memory 21 includes at least one type of computer-readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory ( RAM), static random access memory (SRAM), read only memory (ROM), electrically erasable programmable read only memory (EEPROM), programmable read only memory (PROM), magnetic memory, magnetic disks, optical disks, etc.
  • the memory 21 may be an internal storage unit of the computer device 2, for example, a hard disk or a memory of the computer device 2.
  • the memory 21 may also be an external storage device of the computer device 2, such as a plug-in hard disk, a smart media card (SMC), and a secure digital (Secure Digital, SD) card, flash card (Flash Card), etc.
  • the memory 21 may also include both the internal storage unit of the computer device 2 and its external storage device.
  • the memory 21 is generally used to store the operating system and various application software installed in the computer device 2, such as the program code of the traffic recognition system 20 based on the classification regression dual-domain model in the second embodiment.
  • the memory 21 can also be used to temporarily store various types of data that have been output or will be output.
  • the processor 22 may be a central processing unit (Central Processing Unit, CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments.
  • the processor 22 is generally used to control the overall operation of the computer device 2.
  • the processor 22 is used to run the program code or process data stored in the memory 21, for example, to run the traffic recognition system 20 based on the classification regression dual-domain model, so as to realize the traffic based on the classification regression dual-domain model of the first embodiment. recognition methods.
  • the network interface 23 may include a wireless network interface or a wired network interface, and the network interface 23 is generally used to establish a communication connection between the computer device 2 and other electronic devices.
  • the network interface 23 is used to connect the computer device 2 with an external terminal through a network, and establish a data transmission channel and a communication connection between the computer device 2 and the external terminal.
  • the network may be Intranet, Internet, Global System of Mobile Communication (GSM), Wideband Code Division Multiple Access (WCDMA), 4G network, 5G Network, Bluetooth (Bluetooth), Wi-Fi and other wireless or wired networks.
  • FIG. 3 only shows the computer device 2 with components 20-23, but it should be understood that it is not required to implement all the components shown, and more or fewer components may be implemented instead.
  • the traffic identification system 20 based on the classification regression dual-domain model stored in the memory 21 may also be divided into one or more program modules, and the one or more program modules are stored in the memory 21, It is executed by one or more processors (the processor 22 in this embodiment) to complete the application.
  • FIG. 2 shows a schematic diagram of the program modules of the traffic identification system 20 based on the classification regression dual-domain model according to the second embodiment of the present application.
  • the traffic identification system 20 based on the classification regression dual-domain model It can be divided into an acquisition module 200, an input module 202, a judgment module 204, an output module 206, a sending module 208, and a training module 210.
  • the program module referred to in this application refers to a series of computer program instruction segments that can complete specific functions, and is more suitable than a program to describe the flow identification system 20 based on the classification regression dual-domain model in the computer device 2 Implementation process.
  • the specific functions of the program modules 200-210 have been described in detail in the second embodiment, and will not be repeated here.
  • the computer-readable storage medium may be non-volatile or volatile, such as flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX). Memory, etc.), random access memory (RAM), static random access memory (SRAM), read only memory (ROM), electrically erasable programmable read only memory (EEPROM), programmable read only memory (PROM), magnetic memory , Magnetic disks, optical disks, servers, App application malls, etc., on which computer programs are stored, and the corresponding functions are realized when the programs are executed by the processor.
  • the computer-readable storage medium of this embodiment is used in the traffic identification system 20 based on the classification regression dual-domain model, and the processor executes the following steps:
  • the target picture is input to a classification regression dual-domain model, and the target classification value and target regression value of the target picture are output through the classification regression dual-domain model, wherein the classification dual-domain model includes a pre-trained classifier And a pre-trained regressor, where both the classifier and the regressor are used to identify the traffic in the target picture;

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Mathematical Analysis (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Mathematical Physics (AREA)
  • Evolutionary Biology (AREA)
  • Pure & Applied Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Probability & Statistics with Applications (AREA)
  • Mathematical Optimization (AREA)
  • Computational Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Multimedia (AREA)
  • Operations Research (AREA)
  • Evolutionary Computation (AREA)
  • Algebra (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • Image Analysis (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本申请实施例提供了一种基于分类回归双域模型的流量识别方法,所述方法包括:采集预设区域内的目标图片;将所述目标图片输入到分类回归双域模型,通过所述分类回归双域模型输出所述目标图片的目标分类值和目标回归值,其中,所述分类双域模型包括预先训练好的分类器和预先训练好的的回归器,所述分类器和所述回归器均用于识别所述目标图片中的流量;判断所述目标分类值是否为大于预设分类值;当所述目标分类值大于预设分类值,则基于所述目标回归值输出流量识别结果;当所述目标分类值不大于预设分类值,则基于所述目标分类值输出所述流量识别结果。本申请实施例可在复杂场景下准确的识别出个体数量。

Description

基于分类回归双域模型的流量识别方法和系统
本申请申明2020年02月13日递交的申请号为202010090623.8、名称为“基于分类回归双域模型的流量识别方法和系统”的中国专利申请的优先权,该中国专利申请的整体内容以参考的方式结合在本申请中。
技术领域
本申请实施例涉及人工智能领域,尤其涉及一种基于分类回归双域模型的流量识别方法、系统、计算机设备及计算机可读存储介质。
背景技术
随着科技的进步和人们生活水平的提高,人们的社交活动逐渐增多,商场、交通枢纽、大型活动现场及大型公共场所人流或车流拥堵越来越严重,由于人或车拥堵造成的安全隐患日趋严重,当前,如何自动、实时的,对在复杂场景下的人(或其他需要统计的物体)的数量进行估计具有重要的研究价值,对于公共事务人员提供有效的事件决策也有深入的指导意义,但是,发明人意识到目前流量识别模型对商场、交通枢纽等复杂场景下的个体数量识别精度普遍较低。
因此,如何利用模型精确地识别商场、交通枢纽等等复杂场景下的人、车等的流量,成为了当前要解决的技术问题之一。
发明内容
有鉴于此,有必要提供一种基于分类回归双域模型的流量识别方法、系统、计算机设备及计算机可读存储介质,以解决在复杂场景下不能准确的识别出个体数量模型预测值的精准度低的技术问题。
为实现上述目的,本申请实施例提供了一种基于分类回归双域模型的流量识别方法,所述方法步骤包括:
采集预设区域内的目标图片;
将所述目标图片输入到分类回归双域模型,通过所述分类回归双域模型输出所述目标图片的目标分类值和目标回归值,其中,所述分类双域模型包括预先训练好的分类器和预先训练好的的回归器,所述分类器和所述回归器均用于识别所述目标图片中的流量;
判断所述目标分类值是否为大于预设分类值;
当所述目标分类值大于预设分类值,则基于所述目标回归值输出流量识别结果;
当所述目标分类值不大于预设分类值,则基于所述目标分类值输出所述流量识别结果。
为实现上述目的,本申请实施例还提供了一种基于分类回归双域模型的流量识别系统,包括:
采集模块,用于采集预设区域内的目标图片;
输入模块,用于将所述目标图片输入到分类回归双域模型,通过所述分类回归双域模型输出所述目标图片的目标分类值和目标回归值,其中,所述分类双域模型包括预先训练好的分类器和预先训练好的的回归器,所述分类器和所述回归器均用于识别所述目标图片中的流量;
判断模块,用于判断所述目标分类值是否为大于预设分类值;
输出模块,用于当所述目标分类值大于预设分类值,则基于所述目标回归值输出流量识别结果;当所述目标分类值不大于预设分类值,则基于所述目标分类值输出所述流量识别结果。
为实现上述目的,本申请实施例还提供了一种计算机设备,所述计算机设备包括存储 器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机可读指令,所述计算机可读指令被处理器执行时实现以下步骤:
采集预设区域内的目标图片;
将所述目标图片输入到分类回归双域模型,通过所述分类回归双域模型输出所述目标图片的目标分类值和目标回归值,其中,所述分类双域模型包括预先训练好的分类器和预先训练好的的回归器,所述分类器和所述回归器均用于识别所述目标图片中的流量;
判断所述目标分类值是否为大于预设分类值;
当所述目标分类值大于预设分类值,则基于所述目标回归值输出流量识别结果;
当所述目标分类值不大于预设分类值,则基于所述目标分类值输出所述流量识别结果。
为实现上述目的,本申请实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质内存储有计算机可读指令,所述计算机可读指令可被至少一个处理器所执行,以使所述至少一个处理器执行如下步骤:
采集预设区域内的目标图片;
将所述目标图片输入到分类回归双域模型,通过所述分类回归双域模型输出所述目标图片的目标分类值和目标回归值,其中,所述分类双域模型包括预先训练好的分类器和预先训练好的的回归器,所述分类器和所述回归器均用于识别所述目标图片中的流量;
判断所述目标分类值是否为大于预设分类值;
当所述目标分类值大于预设分类值,则基于所述目标回归值输出流量识别结果;
当所述目标分类值不大于预设分类值,则基于所述目标分类值输出所述流量识别结果。
本申请实施例提供的基于分类回归双域模型的流量识别方法、系统、计算机设备及计算机可读存储介质,为图片出现的个体和个体数量提供了有效的预测与识别方法;本申请实施例对分类器和回归器的结合,使得模型可在复杂场景下准确的识别出个体数量。
附图说明
图1为本申请实施例基于分类回归双域模型的流量识别方法的流程示意图。
图2为本申请基于分类回归双域模型的流量识别系统实施例二的程序模块示意图。
图3为本申请计算机设备实施例三的硬件结构示意图。
具体实施方式
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本申请,并不用于限定本申请。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
需要说明的是,在本申请中涉及“第一”、“第二”等的描述仅用于描述目的,而不能理解为指示或暗示其相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括至少一个该特征。另外,各个实施例之间的技术方案可以相互结合,但是必须是以本领域普通技术人员能够实现为基础,当技术方案的结合出现相互矛盾或无法实现时应当认为这种技术方案的结合不存在,也不在本申请要求的保护范围之内。
以下实施例中,将以计算机设备2为执行主体进行示例性描述。
实施例一
参阅图1,示出了本申请实施例之基于分类回归双域模型的流量识别方法的步骤流程图。可以理解,本方法实施例中的流程图不用于对执行步骤的顺序进行限定。下面以计算机设备2为执行主体进行示例性描述。具体如下。
步骤S100,采集预设区域内的目标图片。
示例性的,所述目标图片可以通过图片采集装置进行采集,所述预设区域可以是大型商场、街道、马路、地铁、停车场、景区或其它活动场所等,例如,可以通过地铁入口的摄像头拍摄得到地铁入口图片。
步骤S102,将所述目标图片输入到分类回归双域模型,通过所述分类回归双域模型输出所述目标图片的目标分类值和目标回归值,其中,所述分类双域模型包括预先训练好的分类器和预先训练好的的回归器,所述分类器和所述回归器均用于识别所述目标图片中的流量。
示例性的,所述目标分类值和目标回归值均可以是一个数值,用于表示所述目标图片中的个体数量,这里以预设区域“地铁入口”为例,通过回归双域模型对在地铁入口拍摄到的地铁入口图片进行识别,得到目标分类值和目标回归值。
示例性的,所述步骤S102可以进一步包括:
步骤S102a1,通过所述分类器对所述目标图片进行分类处理,以得到对应于所述目标图片的多个置信度。
示例性的,所述每个置信度用于表示所述目标图片属于预设多个图片类别的其中一个图片类别的概率。其中,每个图片可以根据图片中的个体数量与预设的阈值进行分类,拥有相同个体数量的图片分为一类,其中,所述阈值为分类器在保证识别精度的情况下可识别的最大的个体识别的数值。例如,当预设的阈值为10时,所述图片可以分为12个图片类别,所述12个图片类别可以包括,一个个体数量为0图片类别、10个个体数量分别为1到10个图片类别以及一个个体数量为大于10图片类别,所以通过所述分类器对所述目标图片进行分类处理,以得到对应于所述目标图片的12个置信度,每个置信度对一个图片类别。
示例性的,这里以预设区域“地铁入口”为例,在分类器中可以通过MSE函数对地铁入口图片的图片类别进行预测,以得到对应于地铁入口图片的多个概率,其中,每个概率对应一个图片类别。
步骤S102a2,根据所述多个置信度中最高的置信度所对应的图片类别,确定所述目标图片的目标图片类别。
示例性的,选择所述多个概率中最大的概率,并将该最大的概率对应的图片类别,作为所述地铁入口图片的第一图片类别。
步骤S102a3,根据所述地铁入口图片的图片类别所述目标图片类别确定所述目标图片的目标分类值,所述目标分类值用于表示所述目标图片中的个体数量。
示例性的,根据第一图片类别对应的数值,确定为所述地铁入口图片中的个体数量,并将该个体数量的数值作为目标分类值。
示例性的,所述步骤S102可以进一步包括:
步骤S102b1,通过回归器对所述目标图片进行回归处理,以得到对应于所述目标图片中个体数量的数值。
示例性的,这里以预设区域“大型商场”为例,在回归器中可以通过交叉熵函数预测大型商场图片中的个体数量,以得到大型商场图片中个体数量的具体数值。
步骤S102b2,对所述数值执行整数化处理以得到整数数值,并将所述整数数值确定为所述目标回归值。
对所述大型商场图片中个体数量的具体数值进行处理以得到整数数值,即,对非整数的进行四舍五入得到一个整数值,将该整数值作为所述目标回归值。
步骤S104,判断所述目标分类值是否为大于预设分类值;当所述目标分类值大于预设分类值,则基于所述目标回归值输出流量识别结果;当所述目标分类值不大于预设分类值,则基于所述目标分类值输出所述流量识别结果。
示例性的,所述流量识别结果可以是预设区域中个体数量;例如,可以是地铁入口的乘客数量、景区入口的游客数量、大型活动场所入口的嘉宾数量和停车场入口的车辆数量 等。
所述预设分类值可以是预设分类值一个阈值,该阈值可以是一个固定的数值,配置该数值可以根据所述分类器可识别的类别数量;其中,所述分类器可识别的类别数量可以根据分类器和回归器识别效果(识别精度和识别效率)进行调整;例如,当预设区域中的个体数量不大于20时分类器的预测效果优于回归器,且当预设区域中的个体数量大于20时回归器的预测效果优于分类器,则所述数值可以设置为20。
不难理解,所述分类器的可识别的类别数量可以为22个,此时,所述分类器最大可识别出的个体数量为20个,即减去一个图片中的个体数量为0的图片类别和一个图片中的大于20个体数量的图片类别,所以该数值可配置为20。
通过所述分类器判断目标分类值是否大于20:
情况一,当目标分类值不大于20时,则将所述目标分类值作为流量识别结果;不难理解,即当目标分类值不大于20时,通过所述分类器的得到结果相比于回归器得到的结果更为精确,所以目标分类值作为流量识别结果。
情况二,当目标分类值大于20时,则将所述回归结果作为流量识别结果;不难理解,即当目标分类值大于20时,通过所述回归器的得到结果相比于分类器得到的结果更为精确,所以回归结果作为流量识别结果。
示例性的,所述基于分类回归双域模型的流量识别方法还包括:将所述流量识别结果发送给目标设备,以使所述目标设备根据所述流量识别结果执行相应的操作;或根据所述流量识别结果生成相应的操作指令,以通过所述操作指令控制所述目标设备执行相应的操作。
示例性的,所述目标设备可以是公共场所的自动阀门,如:停车场入口的自动阀门、地铁入口的自动阀门、景区入口的自动阀门和大型活动场所入口的自动阀门等。根据流量识别结果和自动阀门预先设置操作指令控制自动阀门的打开操作和关闭操作。
示例性的,所述基于分类回归双域模型的流量识别方法还可以包括所述分类器的训练步骤S200~S208:
步骤S200,获取初始分类器。
示例性的,所述初始分类器可以是一个初始的可以用作分类器的深度卷积神经网络模型。
步骤S202,获取多个初始分类图片,每个初始分类图片分配有一个表示个体数量的第一数量标签。
示例性的,所述多个初始分类图片从已有的数据库中获取;还可以先通过照相机等图像采集装置取获取多个图片,然后给每个图片分配一个表示个体数量的第一数量标签,以得到多个初始分类图片。例如,多个图片还可以是某个摄像头拍摄到的图像,还可以是视频帧,其中,摄像头可以是地铁站里的各个监控摄像头、景区入口的各个监控摄像头、地下停车场各个监控摄像头和大型活动场所入口的监控摄像头等。
步骤S204,根据每个初始分类图片对应的所述第一数量标签,将所述多个初始分类图片划分为N+2个图片类别并配置对应的图片类别标签,其中,N为正整数,所述N+2个图片类别包括一个个体数量为0图片类别、N个个体数量为N图片类别以及一个个体数量为大于N图片类别。
需要说明的是,当预设区域中的个体数量不大于N时分类器的预测效果优于回归器,且当预设区域中的个体数量大于N时回归器的预测效果优于分类器,即,所述分类器在预设区域中最大可以识别图片类别为N。
步骤S206,根据各个图片类别标签对应的初始分类图片,配置多个分类训练样本。
示例性的,将携带有图片类别标签的初始分类图片作为分类训练样本,以得到多个分类训练样本。
步骤S208,通过所述多个分类训练样本对所述初始分类器进行训练,以得到训练好的 分类器。
示例性的,通过所述多个分类训练样本对可以用作分类器的深度卷积神经网络模型进行训练,直到模型收敛,以得到分类器。
示例性的,所述初始分类器以交叉熵函数作为分类目标函数,所述交叉熵函数:
Figure PCTCN2020093034-appb-000001
其中,N代表训练样本个数,w为网络参数,p,q分别表示预测概率和训练经验概率,y代表训练标签值,
Figure PCTCN2020093034-appb-000002
代表模型预测值。
示例性的,所述基于分类回归双域模型的流量识别方法还可以包括所述回归器的训练步骤S300~S306:
步骤S300,获取初始回归器。
示例性的,所述初始回归器可以是一个初始的可以用作回归器的深度卷积神经网络模型。
步骤S302,获取多个初始回归图片,每个初始回归图片分配有一个表示个体数量的第二数量标签。
示例性的,所述多个初始回归图片从已有的数据库中获取;还可以先通过照相机等图像采集装置取获取多个图片,然后给每个图片分配一个表示个体数量的第一数量标签,以得到多个初始回归图片。例如,多个图片还可以是某个摄像头拍摄到的图像,还可以是视频帧,其中,摄像头可以是地铁站里的各个监控摄像头、景区入口的各个监控摄像头、地下停车场各个监控摄像头和大型活动场所入口的监控摄像头等。
步骤S304,根据各个所述第二数量标签对应的初始回归图片,配置多个回归训练样本。
示例性的,将携带有第二数量标签的初始回归图片作为回归训练样本,以得到多个回归训练样本。
步骤S306,通过所述多个回归训练样本对所述初始回归器进行训练,以得到训练好的回归器。
示例性的,通过所述多个回归训练样本对可以用作回归器的深度卷积神经网络模型进行训练,直到模型收敛,以得到回归器。
示例性的,所述初始回归器以MSE(Mean Square Error均方误差)函数作为回归目标函数,所述MSE函数:
Figure PCTCN2020093034-appb-000003
其中,n代表训练样本个数,y i代表实际数值,
Figure PCTCN2020093034-appb-000004
代表预测值。
实施例二
图2为本申请基于分类回归双域模型的流量识别系统实施例二的程序模块示意图。基于分类回归双域模型的流量识别系统20可以包括或被分割成一个或多个程序模块,一个或者多个程序模块被存储于存储介质中,并由一个或多个处理器所执行,以完成本申请,并可实现上述基于分类回归双域模型的流量识别方法。本申请实施例所称的程序模块是指能够完成特定功能的一系列计算机程序指令段,比程序本身更适合于描述基于分类回归双域模型的流量识别系统20在存储介质中的执行过程。以下描述将具体介绍本实施例各程序模块的功能:
采集模块200,用于采集预设区域内的目标图片。
输入模块202,用于将所述目标图片输入到分类回归双域模型,通过所述分类回归双域模型输出所述目标图片的目标分类值和目标回归值,其中,所述分类双域模型包括预先 训练好的分类器和预先训练好的的回归器,所述分类器和所述回归器均用于识别所述目标图片中的流量。
示例性的,所述输入模块202还用于:通过所述分类器对所述目标图片进行分类处理,以得到对应于所述目标图片的多个置信度,所述每个置信度用于表示所述目标图片属于预设多个图片类别的其中一个图片类别的概率;根据所述多个置信度中最高的置信度所对应的图片类别,确定所述目标图片的目标图片类别;根据所述目标图片类别确定所述目标图片的目标分类值,所述目标分类值用于表示所述目标图片中的个体数量。
示例性的,所述输入模块202还用于:通过回归器对所述目标图片进行回归处理,以得到对应于所述目标图片中个体数量的数值;对所述数值执行整数化处理以得到整数数值,并将所述整数数值确定为所述目标回归值。
判断模块204,用于判断所述目标分类值是否为大于预设分类值。
输出模块206,用于当所述目标分类值大于预设分类值,则基于所述目标回归值输出流量识别结果;当所述目标分类值不大于预设分类值,则基于所述目标分类值输出所述流量识别结果。用于判断所述分类值是否为大于预设分类值。
示例性的,所述基于分类回归双域模型的流量识别系统20还包括:发送模块208,所述发送模块208,用于:将所述流量识别结果发送给目标设备,以使所述目标设备根据所述流量识别结果执行相应的操作;或根据所述流量识别结果生成相应的操作指令,以通过所述操作指令控制所述目标设备执行相应的操作。
示例性的,所述基于分类回归双域模型的流量识别系统20还包括:训练模块210,所述训练模块210,用于:获取初始分类器;获取多个初始分类图片,每个初始分类图片分配有一个表示个体数量的第一数量标签;根据每个初始分类图片对应的所述第一数量标签,将所述多个初始分类图片划分为N+2个图片类别并配置对应的图片类别标签,其中,N为正整数,所述N+2个图片类别包括一个个体数量为0图片类别、N个个体数量为N图片类别以及一个个体数量为大于N图片类别;根据各个图片类别标签对应的初始分类图片,配置多个分类训练样本;及通过所述多个分类训练样本对所述初始分类器进行训练,以得到训练好的分类器。
示例性的,所述训练模块210还用于:获取初始回归器;获取多个初始回归图片,每个初始回归图片分配有一个表示个体数量的第二数量标签;根据各个所述第二数量标签对应的初始回归图片,配置多个回归训练样本;及通过所述多个回归训练样本对所述初始回归器进行训练,以得到训练好的回归器。
实施例三
参阅图3,是本申请实施例三之计算机设备的硬件架构示意图。本实施例中,所述计算机设备2是一种能够按照事先设定或者存储的指令,自动进行数值计算和/或信息处理的设备。该计算机设备2可以是机架式服务器、刀片式服务器、塔式服务器或机柜式服务器(包括独立的服务器,或者多个服务器所组成的服务器集群)等。如图所示,所述计算机设备2至少包括,但不限于,可通过系统总线相互通信连接存储器21、处理器22、网络接口23、以及基于分类回归双域模型的流量识别系统20。
本实施例中,存储器21至少包括一种类型的计算机可读存储介质,所述可读存储介质包括闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等)、随机访问存储器(RAM)、静态随机访问存储器(SRAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、可编程只读存储器(PROM)、磁性存储器、磁盘、光盘等。在一些实施例中,存储器21可以是计算机设备2的内部存储单元,例如该计算机设备2的硬盘或内存。在另一些实施例中,存储器21也可以是计算机设备2的外部存储设备,例如该计算机设备2上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。当然,存储器21还可以既包括计算机设备2的内部存储单元也包括 其外部存储设备。本实施例中,存储器21通常用于存储安装于计算机设备2的操作系统和各类应用软件,例如实施例二的基于分类回归双域模型的流量识别系统20的程序代码等。此外,存储器21还可以用于暂时地存储已经输出或者将要输出的各类数据。
处理器22在一些实施例中可以是中央处理器(Central Processing Unit,CPU)、控制器、微控制器、微处理器、或其他数据处理芯片。该处理器22通常用于控制计算机设备2的总体操作。本实施例中,处理器22用于运行存储器21中存储的程序代码或者处理数据,例如运行基于分类回归双域模型的流量识别系统20,以实现实施例一的基于分类回归双域模型的流量识别方法。
所述网络接口23可包括无线网络接口或有线网络接口,该网络接口23通常用于在所述计算机设备2与其他电子装置之间建立通信连接。例如,所述网络接口23用于通过网络将所述计算机设备2与外部终端相连,在所述计算机设备2与外部终端之间的建立数据传输通道和通信连接等。所述网络可以是企业内部网(Intranet)、互联网(Internet)、全球移动通讯系统(Global System of Mobile communication,GSM)、宽带码分多址(Wideband Code Division Multiple Access,WCDMA)、4G网络、5G网络、蓝牙(Bluetooth)、Wi-Fi等无线或有线网络。
需要指出的是,图3仅示出了具有部件20-23的计算机设备2,但是应理解的是,并不要求实施所有示出的部件,可以替代的实施更多或者更少的部件。
在本实施例中,存储于存储器21中的基于分类回归双域模型的流量识别系统20还可以被分割为一个或者多个程序模块,所述一个或者多个程序模块被存储于存储器21中,并由一个或多个处理器(本实施例为处理器22)所执行,以完成本申请。
例如,图2示出了本申请实施例二之所述实现基于分类回归双域模型的流量识别系统20的程序模块示意图,该实施例中,所述基于分类回归双域模型的流量识别系统20可以被划分为采集模块200、输入模块202、判断模块204、输出模块206、发送模块208和训练模块210。其中,本申请所称的程序模块是指能够完成特定功能的一系列计算机程序指令段,比程序更适合于描述所述基于分类回归双域模型的流量识别系统20在所述计算机设备2中的执行过程。所述程序模块200-210的具体功能在实施例二中已有详细描述,在此不再赘述。
实施例四
本实施例还提供一种计算机可读存储介质,所述计算机可读存储介质可以是非易失性,也可以是易失性,如闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等)、随机访问存储器(RAM)、静态随机访问存储器(SRAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、可编程只读存储器(PROM)、磁性存储器、磁盘、光盘、服务器、App应用商城等等,其上存储有计算机程序,程序被处理器执行时实现相应功能。本实施例的计算机可读存储介质用于基于分类回归双域模型的流量识别系统20,被处理器执行如下步骤:
采集预设区域内的目标图片;
将所述目标图片输入到分类回归双域模型,通过所述分类回归双域模型输出所述目标图片的目标分类值和目标回归值,其中,所述分类双域模型包括预先训练好的分类器和预先训练好的的回归器,所述分类器和所述回归器均用于识别所述目标图片中的流量;
判断所述目标分类值是否为大于预设分类值;
当所述目标分类值大于预设分类值,则基于所述目标回归值输出流量识别结果;
当所述目标分类值不大于预设分类值,则基于所述目标分类值输出所述流量识别结果。
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可 借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。
以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。

Claims (20)

  1. 一种基于分类回归双域模型的流量识别方法,其中,所述方法包括:
    采集预设区域内的目标图片;
    将所述目标图片输入到分类回归双域模型,通过所述分类回归双域模型输出所述目标图片的目标分类值和目标回归值,其中,所述分类双域模型包括预先训练好的分类器和预先训练好的的回归器,所述分类器和所述回归器均用于识别所述目标图片中的流量;
    判断所述目标分类值是否为大于预设分类值;
    当所述目标分类值大于预设分类值,则基于所述目标回归值输出流量识别结果;
    当所述目标分类值不大于预设分类值,则基于所述目标分类值输出所述流量识别结果。
  2. 如权利要求1所述的基于分类回归双域模型的流量识别方法,其中,所述通过所述分类回归双域模型输出所述目标图片的目标分类值和目标回归值的步骤,包括:
    通过所述分类器执行步骤a1~a3以得到所述目标图片的目标分类值:
    a1:对所述目标图片进行分类处理,以得到对应于所述目标图片的多个置信度,所述每个置信度用于表示所述目标图片属于预设多个图片类别的其中一个图片类别的概率;
    a2:根据所述多个置信度中最高的置信度所对应的图片类别,确定所述目标图片的目标图片类别;
    a3:根据所述目标图片类别确定所述目标图片的目标分类值,所述目标分类值用于表示所述目标图片中的个体数量。
  3. 如权利要求1所述的基于分类回归双域模型的流量识别方法,其中,所述通过所述分类回归双域模型输出所述目标图片的目标分类值和目标回归值的步骤,包括:
    通过所述回归器执行步骤b1~b2以得到所述目标图片的目标回归值:
    b1:对所述目标图片进行回归处理,以得到对应于所述目标图片中个体数量的数值;
    b2:对所述数值执行整数化处理以得到整数数值,并将所述整数数值确定为所述目标回归值。
  4. 如权利要求1所述的基于分类回归双域模型的流量识别方法,其中,所述方法还包括:
    将所述流量识别结果发送给目标设备,以使所述目标设备根据所述流量识别结果执行相应的操作;或
    根据所述流量识别结果生成相应的操作指令,以通过所述操作指令控制所述目标设备执行相应的操作。
  5. 如权利要求1所述的基于分类回归双域模型的流量识别方法,其中,还包括所述分类器的训练步骤:
    获取初始分类器;
    获取多个初始分类图片,每个初始分类图片分配有一个表示个体数量的第一数量标签;
    根据每个初始分类图片对应的所述第一数量标签,将所述多个初始分类图片划分为N+2个图片类别并配置对应的图片类别标签,其中,N为正整数,所述N+2个图片类别包括一个个体数量为0图片类别、N个个体数量为N图片类别以及一个个体数量为大于N图片类别;
    根据各个图片类别标签对应的初始分类图片,配置多个分类训练样本;及
    通过所述多个分类训练样本对所述初始分类器进行训练,以得到所述分类器。
  6. 如权利要求1所述的基于分类回归双域模型的流量识别方法,其中,还包括所述回归器的训练步骤:
    获取初始回归器;
    获取多个初始回归图片,每个初始回归图片分配有一个表示个体数量的第二数量标签;
    根据各个第二数量标签对应的初始回归图片,配置多个回归训练样本;及
    通过所述多个回归训练样本对所述初始回归器进行训练,以得到所述回归器。
  7. 一种基于分类回归双域模型的流量识别系统,其中,包括:
    采集模块,用于采集预设区域内的目标图片;
    输入模块,用于将所述目标图片输入到分类回归双域模型,通过所述分类回归双域模型输出所述目标图片的目标分类值和目标回归值,其中,所述分类双域模型包括预先训练好的分类器和预先训练好的的回归器,所述分类器和所述回归器均用于识别所述目标图片中的流量;
    判断模块,用于判断所述目标分类值是否为大于预设分类值;
    输出模块,用于当所述目标分类值大于预设分类值,则基于所述目标回归值输出流量识别结果;当所述目标分类值不大于预设分类值,则基于所述目标分类值输出所述流量识别结果。
  8. 如权利要求7所述的基于分类回归双域模型的流量识别系统,其中,所述输入模块还用于:
    通过所述分类器对所述目标图片进行分类处理,以得到对应于所述目标图片的多个置信度,所述每个置信度用于表示所述目标图片属于预设多个图片类别的其中一个图片类别的概率;
    根据所述多个置信度中最高的置信度所对应的图片类别,确定所述目标图片的目标图片类别;
    根据所述目标图片类别确定所述目标图片的目标分类值,所述目标分类值用于表示所述目标图片中的个体数量。
  9. 一种计算机设备,所述计算机设备包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机可读指令,其中,所述计算机可读指令被处理器执行时实现以下步骤:
    采集预设区域内的目标图片;
    将所述目标图片输入到分类回归双域模型,通过所述分类回归双域模型输出所述目标图片的目标分类值和目标回归值,其中,所述分类双域模型包括预先训练好的分类器和预先训练好的的回归器,所述分类器和所述回归器均用于识别所述目标图片中的流量;
    判断所述目标分类值是否为大于预设分类值;
    当所述目标分类值大于预设分类值,则基于所述目标回归值输出流量识别结果;
    当所述目标分类值不大于预设分类值,则基于所述目标分类值输出所述流量识别结果。
  10. 如权利要求9所述的计算机设备,其中,所述计算机可读指令被处理器执行时还实现以下步骤:
    通过所述分类器执行步骤a1~a3以得到所述目标图片的目标分类值:
    a1:对所述目标图片进行分类处理,以得到对应于所述目标图片的多个置信度,所述每个置信度用于表示所述目标图片属于预设多个图片类别的其中一个图片类别的概率;
    a2:根据所述多个置信度中最高的置信度所对应的图片类别,确定所述目标图片的目标图片类别;
    a3:根据所述目标图片类别确定所述目标图片的目标分类值,所述目标分类值用于表示所述目标图片中的个体数量。
  11. 如权利要求9所述的计算机设备,其中,所述计算机可读指令被处理器执行时还实现以下步骤:
    通过所述回归器执行步骤b1~b2以得到所述目标图片的目标回归值:
    b1:对所述目标图片进行回归处理,以得到对应于所述目标图片中个体数量的数值;
    b2:对所述数值执行整数化处理以得到整数数值,并将所述整数数值确定为所述目标回归值。
  12. 如权利要求9所述的计算机设备,其中,所述计算机可读指令被处理器执行时还 实现以下步骤:
    将所述流量识别结果发送给目标设备,以使所述目标设备根据所述流量识别结果执行相应的操作;或
    根据所述流量识别结果生成相应的操作指令,以通过所述操作指令控制所述目标设备执行相应的操作。
  13. 如权利要求9所述的计算机设备,其中,所述计算机可读指令被处理器执行时还实现以下步骤:
    获取初始分类器;
    获取多个初始分类图片,每个初始分类图片分配有一个表示个体数量的第一数量标签;
    根据每个初始分类图片对应的所述第一数量标签,将所述多个初始分类图片划分为N+2个图片类别并配置对应的图片类别标签,其中,N为正整数,所述N+2个图片类别包括一个个体数量为0图片类别、N个个体数量为N图片类别以及一个个体数量为大于N图片类别;
    根据各个图片类别标签对应的初始分类图片,配置多个分类训练样本;及
    通过所述多个分类训练样本对所述初始分类器进行训练,以得到所述分类器。
  14. 如权利要求9所述的计算机设备,其中,所述计算机可读指令被处理器执行时还实现以下步骤:
    获取初始回归器;
    获取多个初始回归图片,每个初始回归图片分配有一个表示个体数量的第二数量标签;
    根据各个第二数量标签对应的初始回归图片,配置多个回归训练样本;及
    通过所述多个回归训练样本对所述初始回归器进行训练,以得到所述回归器。
  15. 一种计算机可读存储介质,其中,所述计算机可读存储介质内存储有计算机可读指令,所述计算机可读指令可被至少一个处理器所执行,以使所述至少一个处理器执行如下步骤:
    采集预设区域内的目标图片;
    将所述目标图片输入到分类回归双域模型,通过所述分类回归双域模型输出所述目标图片的目标分类值和目标回归值,其中,所述分类双域模型包括预先训练好的分类器和预先训练好的的回归器,所述分类器和所述回归器均用于识别所述目标图片中的流量;
    判断所述目标分类值是否为大于预设分类值;
    当所述目标分类值大于预设分类值,则基于所述目标回归值输出流量识别结果;
    当所述目标分类值不大于预设分类值,则基于所述目标分类值输出所述流量识别结果。
  16. 如权利要求15所述的计算机可读存储介质,其中,所述计算机可读指令还可被至少一个处理器所执行,以使所述至少一个处理器执行如下步骤:
    通过所述分类器执行步骤a1~a3以得到所述目标图片的目标分类值:
    a1:对所述目标图片进行分类处理,以得到对应于所述目标图片的多个置信度,所述每个置信度用于表示所述目标图片属于预设多个图片类别的其中一个图片类别的概率;
    a2:根据所述多个置信度中最高的置信度所对应的图片类别,确定所述目标图片的目标图片类别;
    a3:根据所述目标图片类别确定所述目标图片的目标分类值,所述目标分类值用于表示所述目标图片中的个体数量。
  17. 如权利要求15所述的计算机可读存储介质,其中,所述计算机可读指令还可被至少一个处理器所执行,以使所述至少一个处理器执行如下步骤:
    通过所述回归器执行步骤b1~b2以得到所述目标图片的目标回归值:
    b1:对所述目标图片进行回归处理,以得到对应于所述目标图片中个体数量的数值;
    b2:对所述数值执行整数化处理以得到整数数值,并将所述整数数值确定为所述目标回归值。
  18. 如权利要求15所述的计算机可读存储介质,其中,所述计算机可读指令还可被至少一个处理器所执行,以使所述至少一个处理器执行如下步骤:
    将所述流量识别结果发送给目标设备,以使所述目标设备根据所述流量识别结果执行相应的操作;或
    根据所述流量识别结果生成相应的操作指令,以通过所述操作指令控制所述目标设备执行相应的操作。
  19. 如权利要求15所述的计算机可读存储介质,其中,所述计算机可读指令还可被至少一个处理器所执行,以使所述至少一个处理器执行如下步骤:
    获取初始分类器;
    获取多个初始分类图片,每个初始分类图片分配有一个表示个体数量的第一数量标签;
    根据每个初始分类图片对应的所述第一数量标签,将所述多个初始分类图片划分为N+2个图片类别并配置对应的图片类别标签,其中,N为正整数,所述N+2个图片类别包括一个个体数量为0图片类别、N个个体数量为N图片类别以及一个个体数量为大于N图片类别;
    根据各个图片类别标签对应的初始分类图片,配置多个分类训练样本;及
    通过所述多个分类训练样本对所述初始分类器进行训练,以得到所述分类器。
  20. 如权利要求15所述的计算机可读存储介质,其中,所述计算机可读指令还可被至少一个处理器所执行,以使所述至少一个处理器执行如下步骤:
    获取初始回归器;
    获取多个初始回归图片,每个初始回归图片分配有一个表示个体数量的第二数量标签;
    根据各个第二数量标签对应的初始回归图片,配置多个回归训练样本;及
    通过所述多个回归训练样本对所述初始回归器进行训练,以得到所述回归器。
PCT/CN2020/093034 2020-02-13 2020-05-28 基于分类回归双域模型的流量识别方法和系统 WO2021159634A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010090623.8A CN111310652B (zh) 2020-02-13 2020-02-13 基于分类回归双域模型的流量识别方法和系统
CN202010090623.8 2020-02-13

Publications (1)

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

Family

ID=71161561

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/093034 WO2021159634A1 (zh) 2020-02-13 2020-05-28 基于分类回归双域模型的流量识别方法和系统

Country Status (2)

Country Link
CN (1) CN111310652B (zh)
WO (1) WO2021159634A1 (zh)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104134078A (zh) * 2014-07-22 2014-11-05 华中科技大学 一种人流量统计系统中分类器的自动选择方法
US20160078323A1 (en) * 2014-09-17 2016-03-17 Samsung Electronics Co., Ltd. Method and apparatus for counting person
CN106599856A (zh) * 2016-12-19 2017-04-26 四川长虹电器股份有限公司 一种联合人脸检测、定位和识别的方法
CN107527024A (zh) * 2017-08-08 2017-12-29 北京小米移动软件有限公司 人脸颜值评估方法及装置

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10949475B2 (en) * 2018-05-14 2021-03-16 Ebay Inc. Search system for providing web crawling query prioritization based on classification operation performance
CN109241914A (zh) * 2018-09-11 2019-01-18 广州广电银通金融电子科技有限公司 一种针对复杂场景下的小目标行人检测方法
CN110059581A (zh) * 2019-03-28 2019-07-26 常熟理工学院 基于场景深度信息的人群计数方法
CN110096979B (zh) * 2019-04-19 2022-08-02 佳都科技集团股份有限公司 模型的构建方法、人群密度估计方法、装置、设备和介质
CN110708285B (zh) * 2019-08-30 2022-04-29 中国平安人寿保险股份有限公司 流量监控方法、装置、介质及电子设备

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104134078A (zh) * 2014-07-22 2014-11-05 华中科技大学 一种人流量统计系统中分类器的自动选择方法
US20160078323A1 (en) * 2014-09-17 2016-03-17 Samsung Electronics Co., Ltd. Method and apparatus for counting person
CN106599856A (zh) * 2016-12-19 2017-04-26 四川长虹电器股份有限公司 一种联合人脸检测、定位和识别的方法
CN107527024A (zh) * 2017-08-08 2017-12-29 北京小米移动软件有限公司 人脸颜值评估方法及装置

Also Published As

Publication number Publication date
CN111310652B (zh) 2023-07-25
CN111310652A (zh) 2020-06-19

Similar Documents

Publication Publication Date Title
Bura et al. An edge based smart parking solution using camera networks and deep learning
EP3806064B1 (en) Method and apparatus for detecting parking space usage condition, electronic device, and storage medium
WO2020248386A1 (zh) 视频分析方法、装置、计算机设备及存储介质
EP4012606A1 (en) Method for estimating and presenting passenger flow, system, and computer readable storage medium
JP6939911B2 (ja) 適応的に車両を制御する方法及び装置
CN113095434B (zh) 目标检测方法及装置、电子设备、存储介质
JP2017525064A (ja) ビデオデータを用いた活動モニタリングのためのシステム及び方法
CN104239386A (zh) 用于对面部识别匹配区分优先级的方法和系统
CN111818313A (zh) 一种基于监控视频的车辆实时追踪方法及装置
CN109492571B (zh) 识别人体年龄的方法、装置及电子设备
CN112164227B (zh) 违停车辆告警方法、装置、计算机设备和存储介质
CN112163525B (zh) 一种事件类型预测方法、装置、电子设备及存储介质
Hakim et al. Implementation of an image processing based smart parking system using Haar-Cascade method
WO2022078353A1 (zh) 车辆行使状态判断方法、装置、计算机设备及存储介质
KR102333143B1 (ko) 무인 계수 서비스 제공 시스템
CN114663871A (zh) 图像识别方法、训练方法、装置、系统及存储介质
CN109063790B (zh) 对象识别模型优化方法、装置和电子设备
CN112381014A (zh) 一种基于城市道路的违停车辆检测及管理方法及系统
EP3890312B1 (en) Distributed image analysis method and system, and storage medium
Salma et al. Smart parking guidance system using 360o camera and haar-cascade classifier on iot system
CN114708545A (zh) 基于图像的对象侦测方法、装置、设备和存储介质
WO2021159634A1 (zh) 基于分类回归双域模型的流量识别方法和系统
CN116486332A (zh) 客流量监测方法、装置、设备及存储介质
CN112016534B (zh) 车辆违停检测的神经网络的训练方法、检测方法和装置
CN115147752A (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: 20919154

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: 20919154

Country of ref document: EP

Kind code of ref document: A1