WO2018036277A1 - 车辆检测的方法、装置、服务器及存储介质 - Google Patents

车辆检测的方法、装置、服务器及存储介质 Download PDF

Info

Publication number
WO2018036277A1
WO2018036277A1 PCT/CN2017/091307 CN2017091307W WO2018036277A1 WO 2018036277 A1 WO2018036277 A1 WO 2018036277A1 CN 2017091307 W CN2017091307 W CN 2017091307W WO 2018036277 A1 WO2018036277 A1 WO 2018036277A1
Authority
WO
WIPO (PCT)
Prior art keywords
vehicle
node
level
area
training
Prior art date
Application number
PCT/CN2017/091307
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 WO2018036277A1 publication Critical patent/WO2018036277A1/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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V2201/00Indexing scheme relating to image or video recognition or understanding
    • G06V2201/08Detecting or categorising vehicles

Definitions

  • the present invention relates to the field of image processing technologies, and in particular, to a method, an apparatus, a server, and a storage medium for vehicle detection.
  • the identification of vehicle information is generally implemented by an automated supervisory system detecting a target object in a vehicle information picture, such as detecting a license plate in a vehicle information picture.
  • a target object in a vehicle information picture such as detecting a license plate in a vehicle information picture.
  • the current identification of vehicle information often encounters more interference and the recognition effect is not good.
  • the traditional vehicle information recognition work is often carried out by using a simple manual setting feature mode, and the recognition work is less efficient when dealing with some complicated scenes.
  • a first aspect of the present invention provides a method for vehicle detection, the method for vehicle detection comprising:
  • the basic feature information is input into the And-Or model generated by the pre-training, to obtain each hierarchical node by using the And-Or model generated by the pre-training, and output the acquired hierarchical nodes as key nodes;
  • a second aspect of the present invention provides a device for detecting a vehicle, the device for detecting the vehicle comprising:
  • An extraction module configured to extract basic feature information of the to-be-detected image by using a predetermined algorithm after receiving the to-be-detected image including the vehicle information;
  • a training module configured to input the basic feature information into a pre-trained And-Or model, to obtain each hierarchical node by using the pre-trained And-Or model, and output the acquired hierarchical nodes as key nodes ;
  • An association module configured to associate key nodes of the output to use the associated key nodes of each level as a better calculation branch
  • a conversion module configured to convert each hierarchical key node in the calculation branch into a position parameter in the to-be-detected picture, and determine, according to a predetermined association relationship between each level of the key node and the graphic template, a graphic template corresponding to each level of key nodes;
  • an output module configured to acquire and output the vehicle location information and the vehicle layout relationship in the to-be-detected image according to the location parameter and the graphic template corresponding to each level key node in the calculation branch.
  • a third aspect of the invention provides a server comprising a memory coupled to the memory, the memory having at least one computer instruction stored thereon, the processor executing the at least one computer instruction to perform the following steps:
  • the basic feature information is input into the And-Or model generated by the pre-training, to obtain each hierarchical node by using the And-Or model generated by the pre-training, and output the acquired hierarchical nodes as key nodes;
  • a fourth aspect of the invention provides a computer readable storage medium having stored thereon at least one computer readable instruction; the at least one computer readable instruction executable by the processor to perform the following steps:
  • the basic feature information is input into the And-Or model generated by the pre-training, to obtain each hierarchical node by using the And-Or model generated by the pre-training, and output the acquired hierarchical nodes as key nodes;
  • the invention has the beneficial effects that the invention firstly starts the image to be detected containing the vehicle information.
  • the step process obtains the basic feature information, and then inputs it into the And-Or model generated by the pre-training to obtain the key nodes of each level, and associates the key nodes of each level as a better calculation branch.
  • the vehicle position information and the vehicle layout relationship can be obtained according to the positional parameters and the graphic template corresponding to the key nodes of each level.
  • This embodiment utilizes And-Or.
  • the model detects and recognizes the vehicle, can process pictures with complex scenes, and effectively recognizes and identifies the vehicle information in the picture with high efficiency.
  • FIG. 1 is a hardware operating environment of a method for detecting a vehicle according to various embodiments of the present invention
  • FIG. 2 is a schematic structural diagram of an embodiment of a server in the operating environment shown in FIG. 1;
  • FIG. 3 is a schematic flow chart of a first embodiment of a method for detecting a vehicle according to the present invention
  • step S2 is a schematic flow chart of step S2 shown in FIG. 3;
  • FIG. 5 is a schematic flow chart of a second embodiment of a method for detecting a vehicle according to the present invention.
  • FIG. 6 is a schematic structural view of a first embodiment of a device for detecting a vehicle according to the present invention.
  • FIG. 7 is a schematic structural view of a second embodiment of a device for detecting a vehicle according to the present invention.
  • FIG. 1 it is a hardware operating environment of the vehicle detecting method of any of the embodiments of FIG. 3 to FIG. 5, which includes a server 10 and at least one terminal device 20 that implements communication interaction with the server 10.
  • the terminal device 20 may be any device having a camera device for capturing a picture of a vehicle, such as a monitor, an electronic eye, a general camera, other electronic devices integrated with a camera, and the like.
  • the terminal device 20 can implement communication interaction with the server 10 through the Internet, a wide area network, a metropolitan area network, a local area network, a virtual private network (VPN), and the like.
  • VPN virtual private network
  • the server 10 can automatically perform numerical calculation and/or information processing in accordance with an instruction set or stored in advance.
  • the server 10 includes a processor 11, a memory 12, and a network interface 13 connected by a system bus.
  • the processor 11 is used to provide computing and control capabilities to support the operation of the server 10, which may include one or more microprocessors, digital processors, and the like.
  • the memory 12 is used to store various data and computer readable instructions required by the server 10 to implement a specific function or operation, and may include a memory and at least one storage medium; the memory provides a cache environment for the operation of the server 10; and the storage medium stores An operating system and at least one computer readable storage instructions executable by the processor 12 to implement the method of vehicle detection of various embodiments of the present application.
  • the network interface 13 is for exchanging data with the terminal device 20 under the instruction of the processor 11, for example, receiving a picture to be detected containing the vehicle information from the shooting of the terminal device 20.
  • the above storage medium can be a non-volatile storage medium such as ROM, EPROM or Flash Memory, etc.
  • server 10 may include more or fewer components than shown in the figures, or some components may be combined, or have different component arrangements.
  • server 10 may further include an input device, a display screen, a sound collection device, and the like.
  • the server 10 may store the picture to be detected in the memory 12, for example, in the storage medium, and execute the memory 12 through the processor 11.
  • FIG. 3 is a schematic flowchart of a method for detecting a vehicle according to an embodiment of the present invention.
  • the method for detecting a vehicle includes the following steps:
  • Step S1 After receiving the to-be-detected picture including the vehicle information, extract basic feature information of the to-be-detected picture by using a predetermined algorithm.
  • the method of vehicle detection of the present embodiment can be applied to the fields of traffic safety monitoring, automobile production, and automobile insurance in a complicated scene, and the terminal device 20 having a picture capturing function captures pictures in these scenes, and captures the information including the vehicle. After the picture, the picture is taken as the picture to be detected, and the basic feature information is extracted by some predetermined algorithm.
  • the predetermined algorithm is some basic algorithms for image processing, such as an image edge detection algorithm
  • the basic feature information is picture information that can be directly input to the And-Or model, for example, the position or mutual position of each part in the image. Relationships, etc.
  • the present embodiment can obtain the gradient edge information of the image to be detected by using a Histogram of Oriented Gradient (HOG) algorithm, and then use the K-means clustering algorithm to obtain the cluster of the image after each gradient edge.
  • HOG Histogram of Oriented Gradient
  • the center uses the DPM (Deformable Parts Model) algorithm to obtain the mutual positional relationship of each part of the image after each gradient edge.
  • DPM Deformable Parts Model
  • step S2 the basic feature information is input into the And-Or model generated by the pre-training to acquire each hierarchical node through the And-Or model generated by the pre-training, and the acquired hierarchical nodes are output as key nodes.
  • the And-Or model is obtained by training a large number of pictures containing vehicle information in advance, and the extracted basic feature information is input to the pre-trained And-Or model, and the pre-training is generated by the pre-training.
  • the And-Or model learns the basic feature information of the input. In the learning process, the root node is first obtained, and then the nodes corresponding to each level are obtained based on the root node, and then the nodes corresponding to the respective levels are output as key nodes.
  • the level includes at least three levels, that is, a hierarchy of the vehicle communication area, a distribution level of each vehicle, and a regional level of each part of the vehicle.
  • the level can also be less than three or more than three.
  • step S3 the output key nodes are associated to use the associated key nodes of each level as a better calculation branch.
  • the output key nodes are associated.
  • the key nodes may be associated based on the root node described above. Specifically, the key nodes in each level may be associated first, for example, the key nodes in the same level are associated according to the positional relationship to determine the same level.
  • the relative positions of the key nodes; then, the key nodes of each level are associated according to the positional relationship, for example, the positions of the key nodes in different levels are correlated to determine the relative positions of the key nodes in different levels, the key nodes
  • the architecture of each part of the image to be detected can be outlined, and then the associated key nodes of each level are used as the better calculation branches of the above-mentioned pre-trained And-Or model in the learning process, so as to perform the next operation.
  • Step S4 converting each level key node in the calculation branch into a position parameter in the to-be-detected picture, and determining each level in the calculation branch according to a predetermined association relationship between each level key node and a graphic template.
  • the graphic template corresponding to the key node.
  • each level key node in the preferred calculation branch is converted into a position parameter in the to-be-detected picture to obtain a specific position of each part in the picture to be detected.
  • a graphic template corresponding to each level of the key node may be determined according to a predetermined association relationship between the key nodes of each level and the graphic template, for example, a key node of a certain level is an ellipse. Shape, the associated graphic template is an ellipse.
  • the image template is a line or a figure formed by different parts when viewed from different angles of different vehicles, and the lines are extracted to form a plurality of graphic templates having one or more nodes, that is, the graphic template is related to the node. Union.
  • Step S5 Acquire and output the vehicle position information and the vehicle layout relationship in the to-be-detected picture according to the position parameter and the graphic template corresponding to each level key node in the calculation branch.
  • the graphic template corresponding to the key nodes of each level may be placed and The position corresponding to the position parameter finally obtains the vehicle position information and the vehicle layout relationship in the picture to be detected, that is, the layout relationship between the specific position of each car and the number of vehicles (when there are multiple cars for the picture to be detected).
  • the embodiment firstly performs preliminary processing on the to-be-detected picture containing the vehicle information to obtain basic feature information, and then inputs the same to the pre-trained And-Or model to obtain key nodes at each level, and each will be After the hierarchical key nodes are associated, they are used as a better calculation branch.
  • For each calculation branch after obtaining the graphic templates of the key nodes of each level and transforming the position parameters of the key nodes of each level, the positions corresponding to the key nodes of each level can be selected.
  • the parameter and the graphic template obtain the vehicle position information and the vehicle layout relationship.
  • the And-Or model is used to detect and identify the vehicle, and the picture with complex scene can be processed, and the vehicle information in the picture is effectively recognized and recognized efficiently. .
  • the foregoing step S2 includes:
  • Step S21 input the basic feature information into the And-Or model generated in advance training, and acquire a vehicle global area, which is represented by an Or node and is used as the And-Or The root node of the model;
  • Step S22 at the vehicle communication area level, each vehicle communication area is decomposed based on the root node, and each of the vehicle communication areas is represented by a different And node;
  • Step S23 extracting, according to the distribution location area level of each of the vehicles, an area corresponding to each vehicle from the respective vehicle communication areas, and an area corresponding to each vehicle is represented by an Or node;
  • Step S24 the local components in the interior of the vehicle form an area level, and each local component area of each vehicle is represented by an And node and organized;
  • step S25 each Or node and each And node are output as key nodes.
  • the hierarchical level includes at least the level of the vehicle communication area, the distribution level of each vehicle, and the level of each local component of the vehicle as an example.
  • the vehicle global area may be acquired by inputting the basic feature information into the pre-trained And-Or model, that is, the area formed by the area including all the vehicles in the picture to be detected, and the vehicle global area is represented by the Or node and The root node of the And-Or model.
  • the respective vehicle communication areas are decomposed based on the root node, for example, the communication area between the first vehicle and the second vehicle is decomposed, until the vehicle communication areas of all the vehicles are decomposed, and the respective vehicle communication areas are respectively separated. Expressed in different And nodes.
  • each vehicle is extracted through the above-mentioned vehicle communication area decomposed at the level of the communication area of the vehicle, so as to extract the area where each vehicle is located, each The area corresponding to a car is represented by an Or node.
  • each Or node and each And node are output as key nodes.
  • the step S2 includes:
  • Step S01 acquiring a preset number of vehicle images with vehicle information as training sample pictures of the And-Or model
  • Step S02 extracting a preset proportion of training sample images as a training set, and using the remaining training sample images as a test set, and determining a vehicle connected area and a distribution position of each vehicle for each training sample picture frame in the training set. Areas and parts of the interior parts of the vehicle;
  • Step S03 training the And-Or model by using the training sample picture after the frame processing, to train and generate an And-Or model for performing image detection;
  • step S04 each training sample picture in the test set is input into the training-generated And-Or model for testing. If the accuracy of the test is greater than or equal to the preset threshold, the training ends.
  • a preset number of vehicle images with vehicle information is acquired as a training sample picture of the And-Or model, for example, 500,000 training sample pictures.
  • a training sample picture of a preset proportion in the training sample picture is extracted as a training set, for example, 70% of the training sample pictures are extracted as a training set, and the remaining 30% is used as a test set.
  • the training first set the vehicle connection area and the distribution of each vehicle for each training sample picture frame in the training set. The location area and each part of the vehicle are composed of regional components. Then, the And-Or model is trained by using the framed training sample picture.
  • the And-Or model mainly acquires and learns vehicle information from three aspects: The first is to learn the context relationship of the vehicle spatial layout according to the framed information, the second is to learn the occlusion relationship of the vehicle according to the framed information, and the third is to learn the visible part of the vehicle according to the framed information.
  • each training sample image in the test set is input into the training-generated And-Or model for testing to test the accuracy. If the accuracy of the test is greater than or equal to a preset threshold, for example, greater than or equal to 0.95, the training is successful, and the training operation ends, and the And-Or model generated by the training can be used as a follow-up.
  • the method further includes: if the accuracy of the test is less than the preset threshold, prompting to increase the number of training sample pictures, returning to step S02 and looping.
  • the accuracy of the test is greater than a preset threshold, for example, less than 0.95
  • the number of training sample pictures needs to be increased, that is, The training sample picture of the training set and the test set is added.
  • the prompt information may be sent to the predetermined terminal to prompt the number of the training sample picture to be increased, and the process returns to step S02 to perform the training again until the accuracy of the test is greater than or equal to the preset threshold.
  • FIG. 6 is a schematic structural diagram of an apparatus for detecting a vehicle according to the present invention.
  • the apparatus for detecting the vehicle includes:
  • the extracting module 101 is configured to extract basic feature information of the to-be-detected image by using a predetermined algorithm after receiving the to-be-detected picture including the vehicle information;
  • the device for detecting a vehicle of the present embodiment can be applied to fields such as traffic safety monitoring, automobile production, and automobile insurance in a complicated scene, and a terminal device having a picture capturing function captures pictures in these scenes when capturing information including vehicle information. After the picture, the picture is taken as the picture to be detected, and the basic feature information is extracted by some predetermined algorithm.
  • the predetermined algorithm is some basic algorithms for image processing, such as an image edge detection algorithm
  • the basic feature information is picture information that can be directly input to the And-Or model, for example, the position or mutual position of each part in the image. Relationships, etc.
  • the present embodiment can obtain the gradient edge information of the image to be detected by using a Histogram of Oriented Gradient (HOG) algorithm, and then use the K-means clustering algorithm to obtain the cluster of the image after each gradient edge.
  • HOG Histogram of Oriented Gradient
  • the center uses the DPM (Deformable Parts Model) algorithm to obtain the mutual positional relationship of each part of the image after each gradient edge.
  • DPM Deformable Parts Model
  • the training module 102 is configured to input the basic feature information into the And-Or model generated by the pre-training, to acquire each hierarchical node by using the And-Or model generated by the pre-training, and use the acquired hierarchical nodes as key nodes.
  • the And-Or model is obtained by training a large number of pictures containing vehicle information in advance, and the extracted basic feature information is input to the pre-trained And-Or model, and the pre-training is generated by the pre-training.
  • the And-Or model learns the basic feature information of the input.
  • the root node is first obtained, and then the layers are obtained based on the root node.
  • the node corresponding to the level, and then the node corresponding to each level is output as a key node.
  • the level includes at least three levels, that is, a hierarchy of the vehicle communication area, a distribution level of each vehicle, and a regional level of each part of the vehicle.
  • the level can also be less than three or more than three.
  • the association module 103 is configured to associate the output key nodes to use the associated hierarchical key nodes as the preferred calculation branches;
  • the output key nodes are associated.
  • the key nodes may be associated based on the root node described above. Specifically, the key nodes in each level may be associated first, for example, the key nodes in the same level are associated according to the location relationship to determine the same The relative position of each key node in the hierarchy; then, the key nodes of each level are associated by positional relationship, for example, the positions of key nodes in different levels are correlated to determine the relative positions of the key nodes in different levels, After the key nodes are associated, the architecture of each part of the image to be detected can be outlined, and then the associated key nodes of each level are used as the better calculation branches of the above-mentioned pre-trained And-Or model in the learning process, so as to proceed to the next step. operating.
  • the conversion module 104 is configured to convert each hierarchical key node in the calculation branch into a position parameter in the to-be-detected picture, and determine the calculation branch according to a predetermined association relationship between each level of the key node and the graphic template. Graphic template corresponding to each level of key nodes;
  • each level key node in the preferred calculation branch is converted into a position parameter in the to-be-detected picture to obtain a specific position of each part in the picture to be detected.
  • a graphic template corresponding to each level of the key node may be determined according to a predetermined association relationship between the key nodes of each level and the graphic template, for example, a key node of a certain level is an ellipse. Shape, the associated graphic template is an ellipse.
  • the image template is a line or a figure formed by different parts when viewed from different angles of different vehicles, and the lines are extracted to form a plurality of graphic templates having one or more nodes, that is, the graphic template is related to the node. Union.
  • the output module 105 is configured to acquire and output the vehicle position information and the vehicle layout relationship in the to-be-detected picture according to the position parameter and the graphic template corresponding to each level key node in the calculation branch.
  • the graphic template corresponding to the key nodes of each level may be placed and The position corresponding to the position parameter finally obtains the vehicle position information and the vehicle layout relationship in the picture to be detected, that is, the layout relationship between the specific position of each car and the number of vehicles (when there are multiple cars for the picture to be detected).
  • the training module 102 includes:
  • An acquiring unit configured to input the basic feature information into a pre-trained And-Or model, and acquire a vehicle global area, where the vehicle global area is represented by an Or node and The root node of the And-Or model;
  • a decomposition unit configured to decompose each vehicle communication area based on the root node at the vehicle communication area level, where each of the vehicle communication areas is represented by a different And node;
  • An extracting unit configured to extract an area corresponding to each vehicle from the respective vehicle communication areas at a level of a distribution location area of each of the vehicles, and an area corresponding to each vehicle is represented by an Or node;
  • An organization unit for forming a regional level in each part of the vehicle interior, and each part of each vehicle is represented by an And node and organized;
  • An output unit for outputting each Or node and each And node as a key node.
  • the hierarchical level includes at least the level of the vehicle communication area, the distribution level of each vehicle, and the level of each local component of the vehicle as an example.
  • the vehicle global area may be acquired by inputting the basic feature information into the pre-trained And-Or model, that is, the area formed by the area including all the vehicles in the picture to be detected, and the vehicle global area is represented by the Or node and The root node of the And-Or model.
  • the respective vehicle communication areas are decomposed based on the root node, for example, the communication area between the first vehicle and the second vehicle is decomposed, until the vehicle communication areas of all the vehicles are decomposed, and the respective vehicle communication areas are respectively separated. Expressed in different And nodes.
  • each vehicle is extracted through the above-mentioned vehicle communication area decomposed at the level of the communication area of the vehicle, so as to extract the area where each vehicle is located, each The area corresponding to a car is represented by an Or node.
  • each Or node and each And node are output as key nodes.
  • the device for detecting a vehicle further includes:
  • the obtaining module 201 is configured to acquire a preset number of vehicle images with vehicle information as a training sample picture of the And-Or model;
  • the frame determining module 202 is configured to extract a preset proportion of training sample images as a training set, and use the remaining training sample images as a test set, and determine a vehicle connected area and each vehicle for each training sample picture frame in the training set. a distribution location area and a partial component area of the interior of the vehicle;
  • a generating module 203 configured to train the And-Or model by using a training sample picture after the frame processing, to generate an And-Or model for performing picture detection;
  • the test module 204 is configured to input each training sample picture in the test set into the training-generated And-Or model for testing. If the accuracy of the test is greater than or equal to a preset threshold, the training ends.
  • a preset number of vehicle images with vehicle information is acquired as a training sample picture of the And-Or model, for example, the training sample picture is 500,000. Zhang.
  • a training sample picture of a preset proportion in the training sample picture is extracted as a training set, for example, 70% of the training sample pictures are extracted as a training set, and the remaining 30% is used as a test set.
  • each training sample picture frame in the training set defines a vehicle connection area, a distribution position area of each vehicle, and a partial component composition area inside the vehicle, and then, using the training sample picture training after the frame processing And-Or model, in this process, And-Or model mainly acquires and learns vehicle information from three aspects: the first is to learn the context of the vehicle space layout according to the framed information, and the second is to learn the occlusion of the vehicle according to the framed information. Relationship, the third is to learn the visible part of the vehicle according to the framed information.
  • each training sample image in the test set is input into the training-generated And-Or model for testing to test the accuracy. If the accuracy of the test is greater than or equal to a preset threshold, for example, greater than or equal to 0.95, the training is successful, and the training operation ends, and the And-Or model generated by the training can be used as a follow-up.
  • the device for detecting a vehicle further includes: an adding module, if the accuracy of the test is less than a preset threshold, prompting to increase the number of training sample pictures, for example, by The predetermined terminal sends a prompt message to prompt to increase the number of training sample pictures, and the triggering block module 202 continues to train to generate an And-Or model for performing picture detection.
  • an adding module if the accuracy of the test is less than a preset threshold, prompting to increase the number of training sample pictures, for example, by The predetermined terminal sends a prompt message to prompt to increase the number of training sample pictures, and the triggering block module 202 continues to train to generate an And-Or model for performing picture detection.
  • each training sample picture in the test set is input into the training-generated And-Or model, and the accuracy of the test is less than a preset threshold, for example, less than 0.95, the number of training sample pictures needs to be increased, that is, The training sample picture of the training set and the test set is added, and the frame module 202 is triggered to re-train until the accuracy of the test is greater than or equal to a preset threshold.
  • a preset threshold for example, less than 0.95
  • the various modules of the above-described vehicle detection device may be implemented in whole or in part by software, hardware or a combination thereof.
  • the foregoing extraction module 101 can be implemented by using a network interface on a server in combination with an image processor
  • the training module 102 can be implemented by a graphics processing unit (GPU), and the like
  • the foregoing modules are It can be stored in the memory of the server in software form, so that the processor of the server can be called to perform the operations corresponding to the above modules.
  • a person skilled in the art can understand that all or part of the process of implementing the above embodiment method can be completed by a computer program to instruct related hardware, and the program can be stored in a non-transitory computer readable storage medium.
  • the program when executed, may include the flow of an embodiment of the methods as described above.
  • the storage medium may be a magnetic disk, an optical disk, a read-only storage memory, or the like.
  • serial numbers before the steps of the method for detecting the vehicle of the embodiments of the present application such as "S1", “S2", “S01”, and "S02", are not used to uniquely define the execution order between the steps of the method. It should be understood by those of ordinary skill in the art that in different embodiments, the order between the steps can be adjusted accordingly.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Data Mining & Analysis (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Engineering & Computer Science (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Image Analysis (AREA)
  • Traffic Control Systems (AREA)

Abstract

本发明涉及一种车辆检测的方法,该方法包括:在接收到包含车辆信息的待检测图片后,通过预定的算法提取待检测图片的基本特征信息;将基本特征信息输入到预先训练生成的And-Or模型中,以获取各层级节点,并将各层级节点作为关键节点输出;将关键节点进行关联,以将关联的各层级关键节点作为较优的演算分支;将演算分支中的各层级关键节点转化为待检测图片中的位置参数,并根据预定的各层级关键节点与图形模板的关联关系确定出演算分支中的各层级关键节点对应的图形模板;根据演算分支中的各层级关键节点对应的位置参数和图形模板获取待检测图片中的车辆位置信息以及车辆布局关系并输出。本发明能高效识别复杂场景图片中的车辆信息。

Description

车辆检测的方法、装置、服务器及存储介质
优先权申明
本申请基于巴黎公约申明享有2016年8月22日递交的申请号为CN201610702626.6、名称为“车辆检测的方法及装置”中国专利申请的优先权,该中国专利申请的整体内容以参考的方式结合在本申请中。
技术领域
本发明涉及图像处理技术领域,尤其涉及一种车辆检测的方法、装置、服务器及存储介质。
背景技术
目前,对车辆信息的识别一般是通过自动化的监管***对车辆信息图片中的目标物体进行检测来实现的,例如检测车辆信息图片中的车牌等。然而,由于现实车辆场景存在多样性、以及车辆间遮挡关系的无规则或可见部位比例的不可控等因素,现行的车辆信息的识别工作往往会遇到较多干扰,识别效果不佳。此外,传统的车辆信息的识别工作往往是采用简单的人工设定特征的模式来进行的,在处理一些复杂场景时,识别工作的效率较低。
发明内容
本发明第一方面提供一种车辆检测的方法,所述车辆检测的方法包括:
S1,在接收到包含车辆信息的待检测图片后,通过预定的算法提取所述待检测图片的基本特征信息;
S2,将所述基本特征信息输入到预先训练生成的And-Or模型中,以通过该预先训练生成的And-Or模型获取各层级节点,并将获取的各层级节点作为关键节点输出;
S3,将输出的关键节点进行关联,以将关联的各层级关键节点作为较优的演算分支;
S4,将所述演算分支中的各层级关键节点转化为所述待检测图片中的位置参数,并根据预定的各层级关键节点与图形模板的关联关系确定出所述演算分支中的各层级关键节点对应的图形模板;
S5,根据所述演算分支中的各层级关键节点对应的位置参数和图形模板获取所述待检测图片中的车辆位置信息以及车辆布局关系并输出。
本发明第二方面提供一种车辆检测的装置,所述车辆检测的装置包括:
提取模块,用于在接收到包含车辆信息的待检测图片后,通过预定的算法提取所述待检测图片的基本特征信息;
训练模块,用于将所述基本特征信息输入到预先训练生成的And-Or模型中,以通过该预先训练生成的And-Or模型获取各层级节点,并将获取的各层级节点作为关键节点输出;
关联模块,用于将输出的关键节点进行关联,以将关联的各层级关键节点作为较优的演算分支;
转化模块,用于将所述演算分支中的各层级关键节点转化为所述待检测图片中的位置参数,并根据预定的各层级关键节点与图形模板的关联关系确定出所述演算分支中的各层级关键节点对应的图形模板;
输出模块,用于根据所述演算分支中的各层级关键节点对应的位置参数和图形模板获取所述待检测图片中的车辆位置信息以及车辆布局关系并输出。
本发明第三方面提供一种服务器,包括存储器以与该存储器连接的处理器,所述存储器上存储有至少一个计算机指令,所述处理器执行该至少一个计算机指令以执行如下步骤:
S1,在接收到包含车辆信息的待检测图片后,通过预定的算法提取所述待检测图片的基本特征信息;
S2,将所述基本特征信息输入到预先训练生成的And-Or模型中,以通过该预先训练生成的And-Or模型获取各层级节点,并将获取的各层级节点作为关键节点输出;
S3,将输出的关键节点进行关联,以将关联的各层级关键节点作为较优的演算分支;
S4,将所述演算分支中的各层级关键节点转化为所述待检测图片中的位置参数,并根据预定的各层级关键节点与图形模板的关联关系确定出所述演算分支中的各层级关键节点对应的图形模板;
S5,根据所述演算分支中的各层级关键节点对应的位置参数和图形模板获取所述待检测图片中的车辆位置信息以及车辆布局关系并输出。
本发明第四方面提供一种计算机可读存储介质,其上存储有至少一个计算机可读指令;该至少一个计算机可读指令可被处理器执行,以执行如下步骤:
S1,在接收到包含车辆信息的待检测图片后,通过预定的算法提取所述待检测图片的基本特征信息;
S2,将所述基本特征信息输入到预先训练生成的And-Or模型中,以通过该预先训练生成的And-Or模型获取各层级节点,并将获取的各层级节点作为关键节点输出;
S3,将输出的关键节点进行关联,以将关联的各层级关键节点作为较优的演算分支;
S4,将所述演算分支中的各层级关键节点转化为所述待检测图片中的位置参数,并根据预定的各层级关键节点与图形模板的关联关系确定出所述演算分支中的各层级关键节点对应的图形模板;
S5,根据所述演算分支中的各层级关键节点对应的位置参数和图形模板获取所述待检测图片中的车辆位置信息以及车辆布局关系并输出。
本发明的有益效果是:本发明首先将包含车辆信息的待检测图片进行初 步处理得到基本特征信息,然后将其输入到预先训练生成的And-Or模型中以获取各层级关键节点,将各层级关键节点关联后作为一较优的演算分支,对于每一演算分支,在获取其各层级关键节点的图形模板及转化各层级的关键节点的位置参数后,可以根据各层级关键节点对应的位置参数和图形模板得到车辆位置信息以及车辆布局关系,本实施例利用And-Or模型对车辆进行检测识别,能够处理具有复杂场景的图片,并对图片中的车辆信息进行有效的识别、识别效率高。
附图说明
图1为本发明各实施例的车辆检测的方法硬件运行环境;
图2为图1所示运行环境中服务器的一实施例的结构示意图;
图3为本发明车辆检测的方法第一实施例的流程示意图;
图4为图3所示步骤S2的流程示意图;
图5为本发明车辆检测的方法第二实施例的流程示意图;
图6为本发明车辆检测的装置第一实施例的结构示意图;
图7为本发明车辆检测的装置第二实施例的结构示意图。
具体实施方式
以下结合附图对本发明的原理和特征进行描述,所举实例只用于解释本发明,并非用于限定本发明的范围。
如图1所示,其为图3至图5任一实施例的车辆检测方法的硬件运行环境,该运行环境包括服务器10及通过与服务器10实现通信交互的至少一个终端设备20。
终端设备20可以是具有摄像装置的用于拍摄车辆图片的任何设备,例如,监视器、电子眼、普通摄像机、集成有摄像头的其他电子设备等。终端设备20可通过互联网、广域网、城域网、局域网、虚拟专用网络(Virtual Private Network,VPN)等与服务器10实现通信交互。
服务器10能够按照事先设定或者存储的指令,自动进行数值计算和/或信息处理。如图2所示,服务器10包括通过***总线连接的处理器11、存储器12及网络接口13。其中,处理器11用于提供计算和控制能力,以支撑服务器10的运行,其可以包括一个或者多个微处理器、数字处理器等。存储器12用于存储服务器10为实现特定功能或操作所需的各种数据及计算机可读指令,其可以包括内存及至少一个存储介质;内存为服务器10的运行提供缓存环境;存储介质上存储有操作***及至少一个计算机可读指令,该至少一个计算机可读存储指令可被处理器12所执行,以实现本申请各实施例的车辆检测的方法。网络接口13用于在处理器11的指令下与终端设备20交换数据,例如,接收来自终端设备20的拍摄的包含车辆信息的待检测图片。
可以理解,上述存储介质可为非易失性存储介质,如ROM、EPROM或 Flash Memory(快闪存储器)等。
可以理解,图2中示出的结构,仅仅是服务器10与本申请方案相关的部分结构的框图,并不构成对服务器10的限定。在不同的实施例中,服务器可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。例如,在某一实施例中,服务器10可进一步包括输入装置、显示屏、声音采集装置,等等。
本实施例中,服务器10接收到终端设备20通过网络传送的包含车辆信息的待检测图片后,可将其存储在存储器12中,例如,存储在存储介质中,并通过处理器11执行存储器12中的计算机可读指令,以实现本申请各实施例的车辆检测的方法。
如图3所示,图3为本发明车辆检测的方法一实施例的流程示意图,该车辆检测的方法包括以下步骤:
步骤S1,在接收到包含车辆信息的待检测图片后,通过预定的算法提取所述待检测图片的基本特征信息。
本实施例的车辆检测的方法可以应用于具有复杂场景下的交通安全监控、汽车生产及汽车保险等领域,利用具有图片拍摄功能的终端设备20在这些场景下捕获图片,当捕获到包含车辆信息的图片后,以该图片作为待检测图片,并通过一些预定的算法来提取其基本特征信息。
本实施例中,预定的算法为图像处理的一些基本算法,例如为图像边缘检测算法等,基本特征信息为可以直接输入至And-Or模型的图片信息,例如为图片中各部分的位置或相互关系等。优选地,本实施例可以利用方向梯度直方图(Histogram of Oriented Gradient,HOG)算法获取待检测图片的梯度边缘信息,然后再采用K-means聚类算法获取各经梯度边缘后的图片的聚类中心或者采用DPM(Deformable Parts Model)算法获取各经梯度边缘后的图片各部分的相互位置关系等。
步骤S2,将所述基本特征信息输入到预先训练生成的And-Or模型中,以通过该预先训练生成的And-Or模型获取各层级节点,并将获取的各层级节点作为关键节点输出。
本实施例中,And-Or模型为预先采用大量的包含车辆信息的图片进行训练得到的,将上述提取得到的基本特征信息输入至该预先训练生成的And-Or模型,通过该预先训练生成的And-Or模型对输入的基本特征信息进行学习,在学习过程中,首先得到根节点,然后基于根节点可以得到各个层级对应的节点,然后将各个层级对应的节点作为关键节点输出。
本实施例的预先训练生成的And-Or模型中,优选地层级至少包括三个,即为车辆连通区域层级、每一辆车的分布位置区域层级及车辆内部的各局部部件组成区域层级。当然层级也可以少于三个或者多于三个。
步骤S3,将输出的关键节点进行关联,以将关联的各层级关键节点作为较优的演算分支。
本实施例中,在关键节点输出后,将输出的关键节点进行关联。其中, 可以以上述的根节点为基础将关键节点进行关联,具体地,可以先将每一层级中的关键节点进行关联,例如将同一层级中的关键节点的按照位置关系进行关联,以确定同一层级中的各关键节点的相对位置;然后,将各层级的关键节点按照位置关系进行关联,例如将不同层级中的关键节点的位置进行关联,以确定不同层级中的各关键节点的相对位置,关键节点进行关联后,可以勾勒出待检测图片各部分的架构,然后将关联的各层级关键节点作为上述预先训练生成的And-Or模型在学习过程中的较优的演算分支,以进行下一步操作。
步骤S4,将所述演算分支中的各层级关键节点转化为所述待检测图片中的位置参数,并根据预定的各层级关键节点与图形模板的关联关系确定出所述演算分支中的各层级关键节点对应的图形模板。
本实施例中,将较优的演算分支中的各层级关键节点转化为待检测图片中的位置参数,以得到待检测图片中各部分的具***置。
另外,对于每一较优的演算分支中的各个层级,可以根据预定的各层级关键节点与图形模板的关联关系确定出每个层级关键节点对应的图形模板,例如某一层级的关键节点为椭圆形,则所关联的图形模板为椭圆。图像模板为通过对不同车辆从不同角度观看时各部分所形成的线条或者图形,通过提取这些线条或图形以形成大量的图形模板,该图形模板具有一个或者多个节点,即图形模板与节点相关联。
步骤S5,根据所述演算分支中的各层级关键节点对应的位置参数和图形模板获取所述待检测图片中的车辆位置信息以及车辆布局关系并输出。
本实施例中,如果已经得到各层级关键节点对应的位置参数(即得到待检测图片中各部分的具***置)以及对应的图形模板,则可以将各层级关键节点对应的图形模板置于与该位置参数对应的位置,最终得到待检测图片中车辆位置信息以及车辆布局关系,即得到每一辆的具***置及多辆车(对于待检测图片有多辆车时而言)之间的布局关系。
与现有技术相比,本实施例首先将包含车辆信息的待检测图片进行初步处理得到基本特征信息,然后将其输入到预先训练生成的And-Or模型中以获取各层级关键节点,将各层级关键节点关联后作为一较优的演算分支,对于每一演算分支,在获取其各层级关键节点的图形模板及转化各层级的关键节点的位置参数后,可以根据各层级关键节点对应的位置参数和图形模板得到车辆位置信息以及车辆布局关系,本实施例利用And-Or模型对车辆进行检测识别,能够处理具有复杂场景的图片,并对图片中的车辆信息进行有效的识别、识别效率高。
在一优选的实施例中,如图4所示,在上述图3的实施例的基础上,上述步骤S2包括:
步骤S21,将所述基本特征信息输入到预先训练生成的And-Or模型中,并获取车辆全局区域,所述车辆全局区域以Or节点表示并作为所述And-Or 模型的根节点;
步骤S22,在所述车辆连通区域层级,基于所述根节点分解出各个车辆连通区域,所述各个车辆连通区域分别以不同的And节点表示;
步骤S23,在所述每一辆车的分布位置区域层级,从所述各个车辆连通区域中抽取出每一辆车对应的区域,每一辆车对应的区域以Or节点表示;
步骤S24,在所述车辆内部的各局部部件组成区域层级,对于每一辆车的各个局部部件区域分别用And节点表示并进行组织;
步骤S25,将各Or节点及各And节点作为关键节点输出。
本实施例中,以层级至少包括车辆连通区域层级、每一辆车的分布位置区域层级及车辆内部的各局部部件组成区域层级为例进行说明。在将基本特征信息输入到预先训练生成的And-Or模型中可以获取到车辆全局区域,即对应于待检测图片中包含所有车辆的区域所形成的区域,车辆全局区域以Or节点表示并作为该And-Or模型的根节点。
在车辆连通区域层级,基于根节点对各个车辆连通区域进行分解,例如分解出第一辆车与第二辆车的连通区域,直至将所有的车辆的车辆连通区域分解出来,各个车辆连通区域分别以不同的And节点表示。
在所述每一辆车的分布位置区域层级,通过上述的车辆连通区域层级分解出来的车辆连通区域,对每一辆车对应的区域进行抽取,以抽取得到每一辆车所在的区域,每一辆车对应的区域以Or节点表示。
在抽取出每一辆车对应的区域后,在车辆内部的各局部部件组成区域层级,对于每一辆车的各个局部部件区域分别用And节点表示并进行组织。最后,将各Or节点及各And节点作为关键节点输出。
在一优选的实施例中,如图5所示,在上述图3的实施例的基础上,所述步骤S2之前包括:
步骤S01,获取预设数量的带有车辆信息的车辆图片作为And-Or模型的训练样本图片;
步骤S02,提取出预设比例的训练样本图片作为训练集,并将剩余的训练样本图片作为测试集,并对训练集中的每张训练样本图片框定出车辆连通区域、每一辆车的分布位置区域及车辆内部的各局部部件组成区域;
步骤S03,利用通过框定处理后的训练样本图片训练所述And-Or模型,以训练生成用于进行图片检测的And-Or模型;
步骤S04,将测试集中的每张训练样本图片输入到训练生成的And-Or模型中以进行测试,若测试的准确率大于等于预设阈值,则训练结束。
本实施例中,在训练生成And-Or模型前,获取预设数量的带有车辆信息的车辆图片作为And-Or模型的训练样本图片,例如训练样本图片为50万张。提取训练样本图片中预设比例的训练样本图片作为训练集,例如提取其中的70%的训练样本图片作为训练集,剩余的30%作为测试集。在训练时,首先对训练集中的每张训练样本图片框定出车辆连通区域、每一辆车的分布 位置区域及车辆内部的各局部部件组成区域,然后,利用通过框定处理后的训练样本图片训练And-Or模型,在该过程中,And-Or模型主要是从三个方面获取和学习车辆信息:第一是根据框定信息学习车辆空间布局的上下文关系,第二是根据框定信息学习车辆的遮挡关系,第三是根据框定信息对车辆可视部分进行学习。在训练生成And-Or模型后,将测试集中的每张训练样本图片输入到训练生成的And-Or模型中以进行测试,以测试准确率。如果测试的准确率大于等于预设阈值,例如大于等于0.95,则训练成功,训练操作结束,该训练生成的And-Or模型可以作为后续使用。
优选地,在上述图5的实施例的基础上,所述步骤S04之后还包括:若测试的准确率小于预设阈值,则提示增加训练样本图片的数量,返回至步骤S02并循环。
本实施例中,如果测试集中的每张训练样本图片输入到训练生成的And-Or模型中后,其测试的准确率大于预设阈值,例如小于0.95,则需要增加训练样本图片的数量,即增加训练集及测试集的训练样本图片,例如可以通过向预定终端发送提示信息,以提示增加训练样本图片的数量,返回至步骤S02,重新进行训练,直至测试的准确率大于等于预设阈值。
如图6所示,图6为本发明车辆检测的装置一实施例的结构示意图,该车辆检测的装置包括:
提取模块101,用于在接收到包含车辆信息的待检测图片后,通过预定的算法提取所述待检测图片的基本特征信息;
本实施例的车辆检测的装置可以应用于具有复杂场景下的交通安全监控、汽车生产及汽车保险等领域,利用具有图片拍摄功能的终端设备在这些场景下捕获图片,当捕获到包含车辆信息的图片后,以该图片作为待检测图片,并通过一些预定的算法来提取其基本特征信息。
本实施例中,预定的算法为图像处理的一些基本算法,例如为图像边缘检测算法等,基本特征信息为可以直接输入至And-Or模型的图片信息,例如为图片中各部分的位置或相互关系等。优选地,本实施例可以利用方向梯度直方图(Histogram of Oriented Gradient,HOG)算法获取待检测图片的梯度边缘信息,然后再采用K-means聚类算法获取各经梯度边缘后的图片的聚类中心或者采用DPM(Deformable Parts Model)算法获取各经梯度边缘后的图片各部分的相互位置关系等。
训练模块102,用于将所述基本特征信息输入到预先训练生成的And-Or模型中,以通过该预先训练生成的And-Or模型获取各层级节点,并将获取的各层级节点作为关键节点输出;
本实施例中,And-Or模型为预先采用大量的包含车辆信息的图片进行训练得到的,将上述提取得到的基本特征信息输入至该预先训练生成的And-Or模型,通过该预先训练生成的And-Or模型对输入的基本特征信息进行学习,在学习过程中,首先得到根节点,然后基于根节点可以得到各个层 级对应的节点,然后将各个层级对应的节点作为关键节点输出。
本实施例的预先训练生成的And-Or模型中,优选地层级至少包括三个,即为车辆连通区域层级、每一辆车的分布位置区域层级及车辆内部的各局部部件组成区域层级。当然层级也可以少于三个或者多于三个。
关联模块103,用于将输出的关键节点进行关联,以将关联的各层级关键节点作为较优的演算分支;
本实施例中,在关键节点输出后,将输出的关键节点进行关联。其中,可以以上述的根节点为基础将关键节点进行关联,具体地,可以先将每一层级中的关键节点进行关联,例如将同一层级中的关键节点的按照位置关系进行关联,以确定同一层级中的各关键节点的相对位置;然后,将各层级的关键节点按照位置关系进行关联,例如将不同层级中的关键节点的位置进行关联,以确定不同层级中的各关键节点的相对位置,关键节点进行关联后,可以勾勒出待检测图片各部分的架构,然后将关联的各层级关键节点作为上述预先训练生成的And-Or模型在学习过程中的较优的演算分支,以进行下一步操作。
转化模块104,用于将所述演算分支中的各层级关键节点转化为所述待检测图片中的位置参数,并根据预定的各层级关键节点与图形模板的关联关系确定出所述演算分支中的各层级关键节点对应的图形模板;
本实施例中,将较优的演算分支中的各层级关键节点转化为待检测图片中的位置参数,以得到待检测图片中各部分的具***置。
另外,对于每一较优的演算分支中的各个层级,可以根据预定的各层级关键节点与图形模板的关联关系确定出每个层级关键节点对应的图形模板,例如某一层级的关键节点为椭圆形,则所关联的图形模板为椭圆。图像模板为通过对不同车辆从不同角度观看时各部分所形成的线条或者图形,通过提取这些线条或图形以形成大量的图形模板,该图形模板具有一个或者多个节点,即图形模板与节点相关联。
输出模块105,用于根据所述演算分支中的各层级关键节点对应的位置参数和图形模板获取所述待检测图片中的车辆位置信息以及车辆布局关系并输出。
本实施例中,如果已经得到各层级关键节点对应的位置参数(即得到待检测图片中各部分的具***置)以及对应的图形模板,则可以将各层级关键节点对应的图形模板置于与该位置参数对应的位置,最终得到待检测图片中车辆位置信息以及车辆布局关系,即得到每一辆的具***置及多辆车(对于待检测图片有多辆车时而言)之间的布局关系。
在一优选的实施例中,在上述图6的实施例的基础上,上述训练模块102包括:
获取单元,用于将所述基本特征信息输入到预先训练生成的And-Or模型中,并获取车辆全局区域,所述车辆全局区域以Or节点表示并作为所述 And-Or模型的根节点;
分解单元,用于在所述车辆连通区域层级,基于所述根节点分解出各个车辆连通区域,所述各个车辆连通区域分别以不同的And节点表示;
抽取单元,用于在所述每一辆车的分布位置区域层级,从所述各个车辆连通区域中抽取出每一辆车对应的区域,每一辆车对应的区域以Or节点表示;
组织单元,用于在所述车辆内部的各局部部件组成区域层级,对于每一辆车的各个局部部件区域分别用And节点表示并进行组织;
输出单元,用于将各Or节点及各And节点作为关键节点输出。
本实施例中,以层级至少包括车辆连通区域层级、每一辆车的分布位置区域层级及车辆内部的各局部部件组成区域层级为例进行说明。在将基本特征信息输入到预先训练生成的And-Or模型中可以获取到车辆全局区域,即对应于待检测图片中包含所有车辆的区域所形成的区域,车辆全局区域以Or节点表示并作为该And-Or模型的根节点。
在车辆连通区域层级,基于根节点对各个车辆连通区域进行分解,例如分解出第一辆车与第二辆车的连通区域,直至将所有的车辆的车辆连通区域分解出来,各个车辆连通区域分别以不同的And节点表示。
在所述每一辆车的分布位置区域层级,通过上述的车辆连通区域层级分解出来的车辆连通区域,对每一辆车对应的区域进行抽取,以抽取得到每一辆车所在的区域,每一辆车对应的区域以Or节点表示。
在抽取出每一辆车对应的区域后,在车辆内部的各局部部件组成区域层级,对于每一辆车的各个局部部件区域分别用And节点表示并进行组织。最后,将各Or节点及各And节点作为关键节点输出。
在一优选的实施例中,如图7所示,在上述图6的实施例的基础上,该车辆检测的装置还包括:
获取模块201,用于获取预设数量的带有车辆信息的车辆图片作为And-Or模型的训练样本图片;
框定模块202,用于提取出预设比例的训练样本图片作为训练集,并将剩余的训练样本图片作为测试集,并对训练集中的每张训练样本图片框定出车辆连通区域、每一辆车的分布位置区域及车辆内部的各局部部件组成区域;
生成模块203,用于利用通过框定处理后的训练样本图片训练所述And-Or模型,以训练生成用于进行图片检测的And-Or模型;
测试模块204,用于将测试集中的每张训练样本图片输入到训练生成的And-Or模型中以进行测试,若测试的准确率大于等于预设阈值,则训练结束。
本实施例中,在训练生成And-Or模型前,获取预设数量的带有车辆信息的车辆图片作为And-Or模型的训练样本图片,例如训练样本图片为50万 张。提取训练样本图片中预设比例的训练样本图片作为训练集,例如提取其中的70%的训练样本图片作为训练集,剩余的30%作为测试集。在训练时,首先对训练集中的每张训练样本图片框定出车辆连通区域、每一辆车的分布位置区域及车辆内部的各局部部件组成区域,然后,利用通过框定处理后的训练样本图片训练And-Or模型,在该过程中,And-Or模型主要是从三个方面获取和学习车辆信息:第一是根据框定信息学习车辆空间布局的上下文关系,第二是根据框定信息学习车辆的遮挡关系,第三是根据框定信息对车辆可视部分进行学习。在训练生成And-Or模型后,将测试集中的每张训练样本图片输入到训练生成的And-Or模型中以进行测试,以测试准确率。如果测试的准确率大于等于预设阈值,例如大于等于0.95,则训练成功,训练操作结束,该训练生成的And-Or模型可以作为后续使用。
优选地,在上述图7的实施例的基础上,该车辆检测的装置还包括:增加模块,用于若测试的准确率小于预设阈值,则提示增加训练样本图片的数量,例如可以通过向预定终端发送提示信息,以提示增加训练样本图片的数量,触发框定模块202以继续训练生成用于进行图片检测的And-Or模型。
本实施例中,如果测试集中的每张训练样本图片输入到训练生成的And-Or模型中后,其测试的准确率小于预设阈值,例如小于0.95,则需要增加训练样本图片的数量,即增加训练集及测试集的训练样本图片,再触发上述的框定模块202,以重新进行训练,直至测试的准确率大于等于预设阈值。
上述车辆检测的装置的各个模块可全部或部分通过软件、硬件或其组合来实现。例如,在硬件实现上,上述提取模块101可通过服务器上的网络接口结合图像处理器来实现,训练模块102可通过图形处理器(GPU)来实现,等等;在软件实现上,上述各模块可以软件形式存储于服务器的存储器中,以便于服务器的处理器调用以执行以上各个模块对应的操作。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一非易失性计算机可读存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体等。此外,本申请各实施例的车辆检测的方法各步骤前的序号,如“S1”、“S2”、“S01”及“S02”等,并非用于唯一限定此方法各步骤之间的执行顺序,本领域普通技术人员应当可以理解,在不同的实施例中,各步骤之间的顺序可以根据需要相应调整。
以上所述仅为本发明的较佳实施例,并不用以限制本发明,凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。

Claims (20)

  1. 一种车辆检测的方法,其特征在于,所述车辆检测的方法包括:
    S1,在接收到包含车辆信息的待检测图片后,通过预定的算法提取所述待检测图片的基本特征信息;
    S2,将所述基本特征信息输入到预先训练生成的And-Or模型中,以通过该预先训练生成的And-Or模型获取各层级节点,并将获取的各层级节点作为关键节点输出;
    S3,将输出的关键节点进行关联,以将关联的各层级关键节点作为较优的演算分支;
    S4,将所述演算分支中的各层级关键节点转化为所述待检测图片中的位置参数,并根据预定的各层级关键节点与图形模板的关联关系确定出所述演算分支中的各层级关键节点对应的图形模板;
    S5,根据所述演算分支中的各层级关键节点对应的位置参数和图形模板获取所述待检测图片中的车辆位置信息以及车辆布局关系并输出。
  2. 根据权利要求1所述的车辆检测的方法,其特征在于,所述层级至少包括以下三个:车辆连通区域层级、每一辆车的分布位置区域层级、及车辆内部的各局部部件组成区域层级。
  3. 根据权利要求2所述的车辆检测的方法,其特征在于,所述步骤S2包括:
    S21,将所述基本特征信息输入到预先训练生成的And-Or模型中,并获取车辆全局区域,所述车辆全局区域以Or节点表示并作为所述And-Or模型的根节点;
    S22,在所述车辆连通区域层级,基于所述根节点分解出各个车辆连通区域,所述各个车辆连通区域分别以不同的And节点表示;
    S23,在所述每一辆车的分布位置区域层级,从所述各个车辆连通区域中抽取出每一辆车对应的区域,每一辆车对应的区域以Or节点表示;
    S24,在所述车辆内部的各局部部件组成区域层级,对于每一辆车的各个局部部件区域分别用And节点表示并进行组织;
    S25,将各Or节点及各And节点作为关键节点输出。
  4. 根据权利要求1至3任一项所述的车辆检测的方法,其特征在于,所述步骤S2之前,该方法还包括:
    S01,获取预设数量的带有车辆信息的车辆图片作为And-Or模型的训练样本图片;
    S02,提取出预设比例的训练样本图片作为训练集,并将剩余的训练样本图片作为测试集,并对训练集中的每张训练样本图片框定出车辆连通区域、每一辆车的分布位置区域及车辆内部的各局部部件组成区域;
    S03,利用通过框定处理后的训练样本图片训练所述And-Or模型,以训练生成用于进行图片检测的And-Or模型;
    S04,将测试集中的每张训练样本图片输入到训练生成的And-Or模型中以进行测试,若测试的准确率大于等于预设阈值,则训练结束。
  5. 根据权利要求4所述的车辆检测的方法,其特征在于,所述步骤S04之后,该方法还包括:
    若测试的准确率小于预设阈值,则提示增加训练样本图片的数量。
  6. 一种车辆检测的装置,其特征在于,所述车辆检测的装置包括:
    提取模块,用于在接收到包含车辆信息的待检测图片后,通过预定的算法提取所述待检测图片的基本特征信息;
    训练模块,用于将所述基本特征信息输入到预先训练生成的And-Or模型中,以通过该预先训练生成的And-Or模型获取各层级节点,并将获取的各层级节点作为关键节点输出;
    关联模块,用于将输出的关键节点进行关联,以将关联的各层级关键节点作为较优的演算分支;
    转化模块,用于将所述演算分支中的各层级关键节点转化为所述待检测图片中的位置参数,并根据预定的各层级关键节点与图形模板的关联关系确定出所述演算分支中的各层级关键节点对应的图形模板;
    输出模块,用于根据所述演算分支中的各层级关键节点对应的位置参数和图形模板获取所述待检测图片中的车辆位置信息以及车辆布局关系并输出。
  7. 根据权利要求6所述的车辆检测的装置,其特征在于,所述层级至少包括以下三个:车辆连通区域层级、每一辆车的分布位置区域层级及车辆内部的各局部部件组成区域层级。
  8. 根据权利要求7所述的车辆检测的装置,其特征在于,所述训练模块包括:
    获取单元,用于将所述基本特征信息输入到预先训练生成的And-Or模型中,并获取车辆全局区域,所述车辆全局区域以Or节点表示并作为所述And-Or模型的根节点;
    分解单元,用于在所述车辆连通区域层级,基于所述根节点分解出各个车辆连通区域,所述各个车辆连通区域分别以不同的And节点表示;
    抽取单元,用于在所述每一辆车的分布位置区域层级,从所述各个车辆连通区域中抽取出每一辆车对应的区域,每一辆车对应的区域以Or节点表示;
    组织单元,用于在所述车辆内部的各局部部件组成区域层级,对于每一辆车的各个局部部件区域分别用And节点表示并进行组织;
    输出单元,用于将各Or节点及各And节点作为关键节点输出。
  9. 根据权利要求6至8任一项所述的车辆检测的装置,其特征在于,还包括:
    获取模块,用于获取预设数量的带有车辆信息的车辆图片作为And-Or模型的训练样本图片;
    框定模块,用于提取出预设比例的训练样本图片作为训练集,并将剩余的训练样本图片作为测试集,并对训练集中的每张训练样本图片框定出车辆连通区域、每一辆车的分布位置区域及车辆内部的各局部部件组成区域;
    生成模块,用于利用通过框定处理后的训练样本图片训练所述And-Or模型,以训练生成用于进行图片检测的And-Or模型;
    测试模块,用于将测试集中的每张训练样本图片输入到训练生成的And-Or模型中以进行测试,若测试的准确率大于等于预设阈值,则训练结束。
  10. 根据权利要求9所述的车辆检测的装置,其特征在于,还包括:
    增加模块,用于若测试的准确率小于预设阈值,则提示增加训练样本图片的数量,触发框定模块以继续训练生成用于进行图片检测的And-Or模型。
  11. 一种服务器,包括存储器以与该存储器连接的处理器,所述存储器上存储有至少一个计算机指令,所述处理器执行该至少一个计算机指令以执行如下步骤:
    S1,在接收到包含车辆信息的待检测图片后,通过预定的算法提取所述待检测图片的基本特征信息;
    S2,将所述基本特征信息输入到预先训练生成的And-Or模型中,以通过该预先训练生成的And-Or模型获取各层级节点,并将获取的各层级节点作为关键节点输出;
    S3,将输出的关键节点进行关联,以将关联的各层级关键节点作为较优的演算分支;
    S4,将所述演算分支中的各层级关键节点转化为所述待检测图片中的位置参数,并根据预定的各层级关键节点与图形模板的关联关系确定出所述演算分支中的各层级关键节点对应的图形模板;
    S5,根据所述演算分支中的各层级关键节点对应的位置参数和图形模板获取所述待检测图片中的车辆位置信息以及车辆布局关系并输出。
  12. 根据权利要求11所述的服务器,其特征在于,所述层级至少包括以下三个:车辆连通区域层级、每一辆车的分布位置区域层级、及车辆内部的各局部部件组成区域层级。
  13. 根据权利要求12所述的服务器,其特征在于,所述步骤S2包括:
    S21,将所述基本特征信息输入到预先训练生成的And-Or模型中,并获取车辆全局区域,所述车辆全局区域以Or节点表示并作为所述And-Or模型的根节点;
    S22,在所述车辆连通区域层级,基于所述根节点分解出各个车辆连通区域,所述各个车辆连通区域分别以不同的And节点表示;
    S23,在所述每一辆车的分布位置区域层级,从所述各个车辆连通区域中抽取出每一辆车对应的区域,每一辆车对应的区域以Or节点表示;
    S24,在所述车辆内部的各局部部件组成区域层级,对于每一辆车的各个局部部件区域分别用And节点表示并进行组织;
    S25,将各Or节点及各And节点作为关键节点输出。
  14. 根据权利要求11至13任一项所述的服务器,其特征在于,所述处理器执行所述至少一个计算机指令,以在所述步骤S2之前执行以下步骤:
    S01,获取预设数量的带有车辆信息的车辆图片作为And-Or模型的训练样本图片;
    S02,提取出预设比例的训练样本图片作为训练集,并将剩余的训练样本图片作为测试集,并对训练集中的每张训练样本图片框定出车辆连通区域、每一辆车的分布位置区域及车辆内部的各局部部件组成区域;
    S03,利用通过框定处理后的训练样本图片训练所述And-Or模型,以训练生成用于进行图片检测的And-Or模型;
    S04,将测试集中的每张训练样本图片输入到训练生成的And-Or模型中以进行测试,若测试的准确率大于等于预设阈值,则训练结束。
  15. 根据权利要求14所述的服务器,其特征在于,所述处理器执行所述至少一个计算机指令,以在所述步骤S04之后执行如下步骤:
    若测试的准确率小于预设阈值,则提示增加训练样本图片的数量。
  16. 一种计算机可读存储介质,其上存储有至少一个计算机可读指令;该至少一个计算机可读指令可被处理器执行,以执行如下步骤:
    S1,在接收到包含车辆信息的待检测图片后,通过预定的算法提取所述待检测图片的基本特征信息;
    S2,将所述基本特征信息输入到预先训练生成的And-Or模型中,以通过该预先训练生成的And-Or模型获取各层级节点,并将获取的各层级节点作为关键节点输出;
    S3,将输出的关键节点进行关联,以将关联的各层级关键节点作为较优的演算分支;
    S4,将所述演算分支中的各层级关键节点转化为所述待检测图片中的位置参数,并根据预定的各层级关键节点与图形模板的关联关系确定出所述演算分支中的各层级关键节点对应的图形模板;
    S5,根据所述演算分支中的各层级关键节点对应的位置参数和图形模板获取所述待检测图片中的车辆位置信息以及车辆布局关系并输出。
  17. 根据权利要求16所述的计算机可读存储介质,其特征在于,所述层级至少包括以下三个:车辆连通区域层级、每一辆车的分布位置区域层级、及车辆内部的各局部部件组成区域层级。
  18. 根据权利要求17所述的计算机可读存储介质,其特征在于,所述步骤S2包括:
    S21,将所述基本特征信息输入到预先训练生成的And-Or模型中,并获取车辆全局区域,所述车辆全局区域以Or节点表示并作为所述And-Or模型的根节点;
    S22,在所述车辆连通区域层级,基于所述根节点分解出各个车辆连通区域,所述各个车辆连通区域分别以不同的And节点表示;
    S23,在所述每一辆车的分布位置区域层级,从所述各个车辆连通区域中抽取出每一辆车对应的区域,每一辆车对应的区域以Or节点表示;
    S24,在所述车辆内部的各局部部件组成区域层级,对于每一辆车的各个局部部件区域分别用And节点表示并进行组织;
    S25,将各Or节点及各And节点作为关键节点输出。
  19. 根据权利要求16至18任一项所述的计算机可读存储介质,其特征在于,所述至少一个计算机可读指令可被处理器执行,以在所述步骤S2之前执行如下步骤:
    S01,获取预设数量的带有车辆信息的车辆图片作为And-Or模型的训练样本图片;
    S02,提取出预设比例的训练样本图片作为训练集,并将剩余的训练样本图片作为测试集,并对训练集中的每张训练样本图片框定出车辆连通区域、每一辆车的分布位置区域及车辆内部的各局部部件组成区域;
    S03,利用通过框定处理后的训练样本图片训练所述And-Or模型,以训练生成用于进行图片检测的And-Or模型;
    S04,将测试集中的每张训练样本图片输入到训练生成的And-Or模型中以进行测试,若测试的准确率大于等于预设阈值,则训练结束。
  20. 根据权利要求19所述的计算机可读存储介质,其特征在于,所述至少一个计算机可读指令可被处理器执行,以在所述步骤S04之后执行如下步骤:
    若测试的准确率小于预设阈值,则提示增加训练样本图片的数量。
PCT/CN2017/091307 2016-08-22 2017-06-30 车辆检测的方法、装置、服务器及存储介质 WO2018036277A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610702626.6A CN106355140B (zh) 2016-08-22 2016-08-22 车辆检测的方法及装置
CN201610702626.6 2016-08-22

Publications (1)

Publication Number Publication Date
WO2018036277A1 true WO2018036277A1 (zh) 2018-03-01

Family

ID=57843768

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/091307 WO2018036277A1 (zh) 2016-08-22 2017-06-30 车辆检测的方法、装置、服务器及存储介质

Country Status (3)

Country Link
CN (1) CN106355140B (zh)
TW (1) TWI635467B (zh)
WO (1) WO2018036277A1 (zh)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110091342A (zh) * 2019-05-20 2019-08-06 金瓜子科技发展(北京)有限公司 车况检测方法、装置和检测机器人
CN110135517A (zh) * 2019-05-24 2019-08-16 北京百度网讯科技有限公司 用于获取车辆相似度的方法及装置
CN110570388A (zh) * 2018-08-31 2019-12-13 阿里巴巴集团控股有限公司 车辆的部件检测方法、装置及设备
CN110991337A (zh) * 2019-12-02 2020-04-10 山东浪潮人工智能研究院有限公司 一种基于自适应双路检测网络的车辆检测方法
CN111144372A (zh) * 2019-12-31 2020-05-12 上海眼控科技股份有限公司 车辆检测方法、装置、计算机设备和存储介质

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106355140B (zh) * 2016-08-22 2018-03-02 平安科技(深圳)有限公司 车辆检测的方法及装置
CN107766929B (zh) 2017-05-05 2019-05-24 平安科技(深圳)有限公司 模型分析方法及装置
CN108647680B (zh) * 2018-04-28 2021-11-12 北京盒子鱼教育科技有限公司 图像定位框检测方法和装置

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103295021A (zh) * 2012-02-24 2013-09-11 北京明日时尚信息技术有限公司 一种静态图片中车辆特征检测及识别的方法及***
CN106355140A (zh) * 2016-08-22 2017-01-25 平安科技(深圳)有限公司 车辆检测的方法及装置

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8385971B2 (en) * 2008-08-19 2013-02-26 Digimarc Corporation Methods and systems for content processing
US8548231B2 (en) * 2009-04-02 2013-10-01 Siemens Corporation Predicate logic based image grammars for complex visual pattern recognition
US8692826B2 (en) * 2009-06-19 2014-04-08 Brian C. Beckman Solver-based visualization framework
CN101645036B (zh) * 2009-09-11 2011-06-01 兰雨晴 基于测试执行机能力度的测试任务自动分配方法
CN101770571B (zh) * 2009-12-29 2013-02-13 北京世纪高通科技有限公司 夜间车辆检测的方法和装置
US9916538B2 (en) * 2012-09-15 2018-03-13 Z Advanced Computing, Inc. Method and system for feature detection
US20130201316A1 (en) * 2012-01-09 2013-08-08 May Patents Ltd. System and method for server based control
CN104346833A (zh) * 2014-10-28 2015-02-11 燕山大学 一种基于单目视觉的车辆重构算法

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103295021A (zh) * 2012-02-24 2013-09-11 北京明日时尚信息技术有限公司 一种静态图片中车辆特征检测及识别的方法及***
CN106355140A (zh) * 2016-08-22 2017-01-25 平安科技(深圳)有限公司 车辆检测的方法及装置

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
LI, BO: "Car Detection and Parsing with Hierarchical And-Or Model", CHINA DOCTORAL DISSERTATIONS FULL-TEXT DATABASE ELECTRONIC JOURNALS, 15 July 2016 (2016-07-15), ISSN: 1674-022X *
SONG, XI: "Visual Object Modeling and Detection with And-Or Graph Model and Discriminative Learning", CHINA DOCTORAL DISSERTATIONS FULL-TEXT DATABASE (ELECTRONIC JOURNALS, 15 April 2015 (2015-04-15), ISSN: 1674-022X *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110570388A (zh) * 2018-08-31 2019-12-13 阿里巴巴集团控股有限公司 车辆的部件检测方法、装置及设备
CN110091342A (zh) * 2019-05-20 2019-08-06 金瓜子科技发展(北京)有限公司 车况检测方法、装置和检测机器人
CN110091342B (zh) * 2019-05-20 2024-04-26 金瓜子科技发展(北京)有限公司 车况检测方法、装置和检测机器人
CN110135517A (zh) * 2019-05-24 2019-08-16 北京百度网讯科技有限公司 用于获取车辆相似度的方法及装置
CN110135517B (zh) * 2019-05-24 2023-04-07 北京百度网讯科技有限公司 用于获取车辆相似度的方法及装置
CN110991337A (zh) * 2019-12-02 2020-04-10 山东浪潮人工智能研究院有限公司 一种基于自适应双路检测网络的车辆检测方法
CN110991337B (zh) * 2019-12-02 2023-08-25 山东浪潮科学研究院有限公司 一种基于自适应双路检测网络的车辆检测方法
CN111144372A (zh) * 2019-12-31 2020-05-12 上海眼控科技股份有限公司 车辆检测方法、装置、计算机设备和存储介质

Also Published As

Publication number Publication date
CN106355140B (zh) 2018-03-02
TW201812718A (zh) 2018-04-01
CN106355140A (zh) 2017-01-25
TWI635467B (zh) 2018-09-11

Similar Documents

Publication Publication Date Title
WO2018036277A1 (zh) 车辆检测的方法、装置、服务器及存储介质
CN109508688B (zh) 基于骨架的行为检测方法、终端设备及计算机存储介质
US10769496B2 (en) Logo detection
CN109492612B (zh) 基于骨骼点的跌倒检测方法及其跌倒检测装置
WO2018036276A1 (zh) 图片品质的检测方法、装置、服务器及存储介质
CN109670444B (zh) 姿态检测模型的生成、姿态检测方法、装置、设备及介质
KR102223478B1 (ko) 눈 상태 검출에 딥러닝 모델을 이용하는 눈 상태 검출 시스템 및 그 작동 방법
KR102318027B1 (ko) 자율 주행을 위한 비전-기반 샘플-효율적 강화 학습 프레임워크
KR20190054702A (ko) 영상에서 객체의 행동을 인식하는 방법 및 그 장치
CN112037142B (zh) 一种图像去噪方法、装置、计算机及可读存储介质
CN108256454B (zh) 一种基于cnn模型的训练方法、人脸姿态估测方法及装置
CN108229494B (zh) 网络训练方法、处理方法、装置、存储介质和电子设备
US9355641B2 (en) Monitoring device using selective attention model and method for monitoring same
CN111008576A (zh) 行人检测及其模型训练、更新方法、设备及可读存储介质
US20210110559A1 (en) Determining method, information processing apparatus, and recording medium
US11120308B2 (en) Vehicle damage detection method based on image analysis, electronic device and storage medium
CN114870384A (zh) 一种基于动态识别的太极拳训练方法及***
CN112562159A (zh) 一种门禁控制方法、装置、计算机设备和存储介质
CN111881740A (zh) 人脸识别方法、装置、电子设备及介质
CN115471863A (zh) 三维姿态的获取方法、模型训练方法和相关设备
JP6842618B2 (ja) 3dマップの作成
CN113591885A (zh) 目标检测模型训练方法、设备及计算机存储介质
JP2015041293A (ja) 画像認識装置および画像認識方法
CN114038045A (zh) 一种跨模态人脸识别模型构建方法、装置及电子设备
EP3762855A1 (en) Method and device for recognizing object

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 27/06/2019)

122 Ep: pct application non-entry in european phase

Ref document number: 17842700

Country of ref document: EP

Kind code of ref document: A1