CN110096935A - Image analysis method, device, electronic equipment and storage medium - Google Patents

Image analysis method, device, electronic equipment and storage medium Download PDF

Info

Publication number
CN110096935A
CN110096935A CN201810096195.2A CN201810096195A CN110096935A CN 110096935 A CN110096935 A CN 110096935A CN 201810096195 A CN201810096195 A CN 201810096195A CN 110096935 A CN110096935 A CN 110096935A
Authority
CN
China
Prior art keywords
group
result
testing result
vehicle
frame
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201810096195.2A
Other languages
Chinese (zh)
Inventor
向杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Hikvision Digital Technology Co Ltd
Original Assignee
Hangzhou Hikvision Digital Technology Co Ltd
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 Hangzhou Hikvision Digital Technology Co Ltd filed Critical Hangzhou Hikvision Digital Technology Co Ltd
Priority to CN201810096195.2A priority Critical patent/CN110096935A/en
Publication of CN110096935A publication Critical patent/CN110096935A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/25Determination of region of interest [ROI] or a volume of interest [VOI]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/60Type of objects
    • G06V20/62Text, e.g. of license plates, overlay texts or captions on TV images
    • G06V20/625License plates
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Multimedia (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)
  • Human Computer Interaction (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Image Analysis (AREA)

Abstract

The embodiment of the invention provides a kind of image analysis method, device, electronic equipment and storage mediums, are applied to intelligent Video Surveillance Technology field, above-mentioned image analysis method includes: acquisition image to be detected;By preset algorithm of target detection, described image to be detected is detected, obtains multiple object detection results;The multiple object detection results are merged according to default merging rule, target is obtained and merges testing result.In the embodiment of the present invention, the default object detection results for merging rule will be met to merge, the connection between each object detection results can be enhanced, rich image analyzes result, it is subsequent that directly target merging testing result can be handled, facilitate the subsequent processing of image, while reducing the subsequent target number for needing to track, reduces the calculation amount of succeeding target tracking.

Description

Image analysis method, device, electronic equipment and storage medium
Technical field
The present invention relates to intelligent Video Surveillance Technology field, more particularly to image analysis method, device, electronic equipment and Storage medium.
Background technique
With the development of intelligent Video Surveillance Technology, every aspect of the monitoring device throughout life, such as traffic intersection Camera, the monitor in elevator and the camera in scenic spot etc..Figure is carried out by the monitoring image acquired to each monitoring device As analysis, to provide safer living environment for people.
In relevant image analysis method, using algorithm of target detection, each mesh to be detected in monitoring image is extracted respectively Target object detection results.But in this method, the object detection results of each target to be detected are extracted respectively, lead to image It is single to analyze result, it has not been convenient to the subsequent processing of image, and a large amount of scattered testing results can greatly increase the mesh for needing to track Number is marked, the calculation amount of succeeding target tracking is increased.
Summary of the invention
The embodiment of the present invention is designed to provide a kind of image analysis method, device, electronic equipment and storage medium, with Rich image analysis is realized as a result, facilitating the subsequent processing of image, while reducing the subsequent target number for needing to track, is reduced The calculation amount of succeeding target tracking.Specific technical solution is as follows:
In a first aspect, the embodiment of the invention provides a kind of image analysis methods, which comprises
Obtain image to be detected;
By preset algorithm of target detection, described image to be detected is detected, obtains multiple object detection results;
The multiple object detection results are merged according to default merging rule, target is obtained and merges testing result.
Optionally, described that the multiple object detection results are merged according to default merging rule, obtain target conjunction And the step of testing result, includes:
According to default rule of classification, the multiple object detection results are grouped, obtain multiple testing result groupings;
According to rule is merged in preset group, the object detection results for including in each testing result grouping are closed And it obtains merging testing result in group;
It, will be in each object detection results and group between each testing result grouping according to rule is merged between preset group Merge testing result to merge, obtains merging testing result between group;
Testing result will be merged between each described group, merges testing result as target.
Optionally, described to be grouped the multiple object detection results according to default rule of classification, obtain multiple inspections Surveying the step of result is grouped includes:
In the multiple object detection results, by human detection result, head and shoulder testing result, number of people testing result and people Face testing result is referred to human body group, by the vehicle detection result of first kind vehicle and the car plate detection knot of the first kind vehicle Fruit is referred to the first vehicle group, the vehicle detection result of the second class vehicle is referred to the second vehicle group, by the vehicle of third class vehicle Testing result is referred to third vehicle group, wherein the first kind vehicle is the vehicle that wheel count is no less than 4, second class Vehicle is the vehicle that wheel count is 2, and the third class vehicle is the vehicle that wheel number is 3.
Optionally, described according to rule is merged in preset group, each testing result is grouped the target detection for including As a result merge, obtain group in merge testing result a step of include:
According to positional relationship, the object detection results that each testing result grouping includes are merged, are obtained every Group interior main body testing result and group inner assembly testing result after target merges in a group, as merging testing result in group.
Optionally, the multiple object detection results include human detection result, head and shoulder testing result, number of people testing result And Face datection is as a result, testing result grouping includes human body group;
It is described according to positional relationship, the object detection results that each testing result grouping includes are merged, are obtained Group interior main body testing result and group inner assembly testing result after target merges in each group, as merging testing result in group The step of include:
In the human body group, according to goal-selling frame method of adjustment, human body in each human detection result is adjusted The size of number of people frame in the height of frame and the number of people testing result;
According to height human body frame adjusted, the head and shoulder frame of the head and shoulder testing result, size number of people frame adjusted and The positional relationship of the face frame of the Face datection result determines the object detection results for belonging to same target subject;
For each target subject, chooses and define highest-ranking object detection results, as the target subject Group interior main body testing result other object detection results in addition to the subject detection result of the target subject are made For the group inner assembly testing result of the target subject, wherein described to define the sequence of rank from high to low successively are as follows: human body inspection Survey result, head and shoulder testing result, number of people testing result and Face datection result;
The group interior main body testing result of each target subject and group inner assembly testing result are merged respectively, obtained Merge testing result in the group of the human body group.
Optionally, the multiple object detection results further include the vehicle detection result and the first kind of first kind vehicle The car plate detection of vehicle is as a result, testing result grouping further includes the first vehicle group, wherein the first kind vehicle is wheel number The vehicle of amount no less than 4;
It is described according to positional relationship, the object detection results that each testing result grouping includes are merged, are obtained Group interior main body testing result and group inner assembly testing result after target merges in each group, as merging testing result in group The step of include:
In first Che Zuzhong, vehicle frame and each car plate detection result of each vehicle detection result of detection The positional relationship of license plate frame;
If in the vehicle frame including the license plate frame, using the corresponding vehicle detection result of the vehicle frame as main in group Physical examination is surveyed as a result, the corresponding car plate detection result of the license plate frame for including using the vehicle frame is as group inner assembly testing result;
If not including the license plate frame in the vehicle frame, using the corresponding vehicle detection result of the vehicle frame as in group Subject detection is as a result, group inner assembly testing result is sky;
If the license plate frame is not included in the vehicle frame, using the corresponding car plate detection result of the license plate frame as group Interior main body testing result, group inner assembly testing result are sky;
Each described group of interior main body testing result and corresponding group inner assembly testing result are merged respectively, obtained described Merge testing result in the group of first vehicle group.
Optionally, described according to rule is merged between preset group, between each testing result grouping, by each target detection As a result and in group merge testing result to merge, obtaining the step of merging testing result between group includes:
According to positional relationship, between each testing result grouping, detection will be merged in each object detection results and group As a result it merges, obtains between the group after merging between each group between subject detection result and group component detection as a result, closing as between group And testing result
Optionally, described according to positional relationship, between each testing result grouping, by each object detection results and Merge testing result in group to merge, obtains between the group after merging between each group component detection knot between subject detection result and group Fruit, before merging testing result between group, the method also includes:
According to semantic relation, merging combination between group is determined, wherein merge between same described group and include at least two in combination Testing result grouping;
It is described according to positional relationship, between each testing result grouping, will merge in each object detection results and group Testing result merges, and obtains between the group after merging between each group between subject detection result and group component detection as a result, as group Between merge testing result, comprising:
For combination is merged between each described group, according to positional relationship, each testing result point of combination is merged between the group Between group, is merged testing result is merged in each object detection results and group, obtain main body between the group after merging between each group Component detection between testing result and group is as a result, as testing result is merged between group.
Optionally, the multiple object detection results further include the vehicle detection result and third class vehicle of the second class vehicle Vehicle detection as a result, testing result grouping further includes the second vehicle group and third vehicle group, wherein the second class vehicle is The vehicle that wheel count is 2, the third class vehicle is the vehicle that wheel number is 3;
It is described according to semantic relation, determine that the step of merging combination between group includes:
Merge to merge between combination, second group according to semantic relation, between determining first group and merge combination between combination and third group, Wherein, it includes the human body group and the first vehicle group that combination is merged between described first group, and combination packet is merged between described second group The human body group and the second vehicle group are included, it includes the human body group and the third vehicle group that combination is merged between the third group.
Optionally, described for combination is merged between each described group, according to positional relationship, the inspection of combination is merged between the group It surveys between result grouping, merges, obtained after merging between each group by testing result is merged in each object detection results and group Between group between subject detection result and group component detection as a result, as between group merge testing result the step of include:
For combination is merged between described second group, detect the cart frame of the vehicle detection result of the second class vehicle with The positional relationship of the body frame of interior main body testing result is organized in the human body group;
If in the cart frame including the body frame, the vehicle of the corresponding second class vehicle of the cart frame is examined Result is surveyed as subject detection between group as a result, corresponding group of interior main body testing result of body frame for including by the cart frame and Group inner assembly testing result is as component detection result between group;
If not including the body frame in the cart frame, by the vehicle of the corresponding second class vehicle of the cart frame Testing result is as subject detection between group as a result, component detection result is sky between group;
If the body frame is not included in the cart frame, by corresponding group of interior main body testing result of the body frame As subject detection between group as a result, using corresponding group of inner assembly testing result of the body frame as component detection result between group;
Respectively by component detection result merges between subject detection result and corresponding group between each described group, obtain described Merge testing result between the group of second vehicle group.
Optionally, described for combination is merged between each described group, according to positional relationship, the inspection of combination is merged between the group It surveys between result grouping, merges, obtained after merging between each group by testing result is merged in each object detection results and group Between group between subject detection result and group component detection as a result, as between group merge testing result the step of include:
For combination is merged between the third group, detect the tricycle frame of the vehicle detection result of the third class vehicle with The positional relationship of the body frame of interior main body testing result is organized in the human body group;
If in the tricycle frame including the body frame, the vehicle of the corresponding third class vehicle of the tricycle frame is examined Result is surveyed as subject detection between group as a result, testing result work will be merged in the tricycle frame include corresponding group of body frame The component detection result between group;
If not including the body frame in the tricycle frame, by the vehicle of the corresponding third class vehicle of the tricycle frame Testing result is as subject detection between group as a result, component detection result is sky between group;
If the body frame is not included in the tricycle frame, by corresponding group of interior main body testing result of the body frame As subject detection between group as a result, using corresponding group of inner assembly testing result of the body frame as component detection result between group;
Respectively by component detection result merges between subject detection result and corresponding group between each described group, obtain described Merge testing result between the group of third vehicle group.
Optionally, described for combination is merged between each described group, according to positional relationship, the inspection of combination is merged between the group It surveys between result grouping, merges, obtained after merging between each group by testing result is merged in each object detection results and group Between group between subject detection result and group component detection as a result, as between group merge testing result the step of include:
For combination is merged between described first group, detect organized in the first vehicle group the body frame of interior main body testing result with The positional relationship of the body frame of interior main body testing result is organized in the human body group;
If being organized in the first vehicle group in the body frame of interior main body testing result comprising group interior main body inspection in the human body group The body frame for surveying result, using the group interior main body testing result of the first vehicle group as subject detection between group as a result, by described the Merge testing result as component detection result between group in the group inner assembly testing result of one vehicle group and the group of the human body group;
Interior main body is organized if organizing in the first vehicle group and not including in the human body group in the body frame of interior main body testing result The body frame of testing result, as a result, will be described using the group interior main body testing result of the first vehicle group as subject detection between group The group inner assembly testing result of first vehicle group is as component detection result between group;
If the body frame for organizing interior main body testing result in the human body group is not included in the first vehicle group in group It, as a result, will using the group interior main body testing result of the human body group as subject detection between group in the body frame of subject detection result The group inner assembly testing result of the human body group is as component detection result between group;
Respectively by component detection result merges between subject detection result and corresponding group between each described group, obtain described Merge testing result between the group of first vehicle group.
Second aspect, the embodiment of the invention provides a kind of image analysis apparatus, described device includes:
Image collection module, for obtaining image to be detected;
Module of target detection, for detecting, obtaining to described image to be detected by preset algorithm of target detection Multiple object detection results;
As a result merging module is obtained for merging according to default merging rule to the multiple object detection results Target merges testing result.
Optionally, the result merging module includes:
As a result it is grouped submodule, for the multiple object detection results being grouped, are obtained according to default rule of classification It is grouped to multiple testing results;
Merge submodule in group, for will include in each testing result grouping according to rule is merged in preset group Object detection results merge, obtain group in merge a testing result;
Merge submodule between group, it, will be each between each testing result grouping for regular according to merging between preset group Merge testing result in object detection results and group to merge, obtains merging testing result between group;
As a result it determines submodule, for testing result will to be merged between each described group, merges testing result as target.
Optionally, the result is grouped submodule, is specifically used for:
In the multiple object detection results, by human detection result, head and shoulder testing result, number of people testing result and people Face testing result is referred to human body group, by the vehicle detection result of first kind vehicle and the car plate detection knot of the first kind vehicle Fruit is referred to the first vehicle group, the vehicle detection result of the second class vehicle is referred to the second vehicle group, by the vehicle of third class vehicle Testing result is referred to third vehicle group, wherein the first kind vehicle is the vehicle that wheel count is no less than 4, second class Vehicle is the vehicle that wheel count is 2, and the third class vehicle is the vehicle that wheel number is 3.
Optionally, described group of interior merging submodule, is specifically used for:
According to positional relationship, the object detection results that each testing result grouping includes are merged, are obtained every Group interior main body testing result and group inner assembly testing result after target merges in a group, as merging testing result in group.
Optionally, the multiple object detection results include human detection result, head and shoulder testing result, number of people testing result And Face datection is as a result, testing result grouping includes human body group;
Merging submodule in described group includes:
Detection block adjustment unit, for according to goal-selling frame method of adjustment, adjusting each described in the human body group In human detection result in the height of human body frame and the number of people testing result number of people frame size;
Human body group position comparing unit, for the head and shoulder according to height human body frame adjusted, the head and shoulder testing result The positional relationship of frame, size number of people frame adjusted and the face frame of the Face datection result, determines to belong to same target The object detection results of main body;
Human body group main body determination unit is chosen for being directed to each target subject and defines highest-ranking target inspection The group interior main body testing result as a result, as the target subject is surveyed, the target subject is removed into the subject detection result Other outer object detection results, the group inner assembly testing result as the target subject, wherein the definition rank is by height Successively to low sequence are as follows: human detection result, head and shoulder testing result, number of people testing result and Face datection result;
Combining unit in human body group group, for respectively will be in the group interior main body testing result and group of each target subject Component detection result merges, and obtains merging testing result in the group of the human body group.
Optionally, the multiple object detection results further include the vehicle detection result and the first kind of first kind vehicle The car plate detection of vehicle is as a result, testing result grouping further includes the first vehicle group, wherein the first kind vehicle is wheel number The vehicle of amount no less than 4;
Merging submodule in described group includes:
First vehicle group position comparing unit, for detecting the vehicle of each vehicle detection result in first Che Zuzhong The positional relationship of frame and the license plate frame of each car plate detection result;
First main body determination unit, if for including the license plate frame in the vehicle frame, the vehicle frame is corresponding Vehicle detection result as group interior main body testing result, make by the corresponding car plate detection result of the license plate frame for including by the vehicle frame For a group inner assembly testing result;
Second main body determination unit, if for not including the license plate frame in the vehicle frame, the vehicle frame is corresponding Vehicle detection result as group an interior main body testing result, group inner assembly testing result be sky;
Third main body determination unit, if being not included in the vehicle frame for the license plate frame, by the license plate frame pair The car plate detection result answered is sky as group interior main body testing result, group inner assembly testing result;
Combining unit in first vehicle group group, for organizing inner assembly by each described group of interior main body testing result and accordingly respectively Testing result merges, and obtains merging testing result in the group of the first vehicle group.
Optionally, merge submodule between described group, be specifically used for:
According to positional relationship, between each testing result grouping, detection will be merged in each object detection results and group As a result it merges, obtains between the group after merging between each group between subject detection result and group component detection as a result, closing as between group And testing result.
Optionally, the image analysis apparatus of the embodiment of the present invention further include:
Determining module is combined, for determining merging combination between group, wherein merge between same described group according to semantic relation Two testing result groupings are included at least in combination;
Merge submodule between described group, is specifically used for for combination is merged between each described group, according to positional relationship, at this Merge between each testing result grouping of combination between group, merged testing result is merged in each object detection results and group, Component detection is obtained between the group after merging between each group between subject detection result and group as a result, as testing result is merged between group.
Optionally, in the image analysis apparatus of the embodiment of the present invention, the multiple object detection results further include second The vehicle detection result of class vehicle and the vehicle detection of third class vehicle are as a result, testing result grouping further includes the second vehicle group And third vehicle group, wherein the second class vehicle is the vehicle that wheel count is 2, and it is 3 that the third class vehicle, which is wheel number, Vehicle;
The combination determining module, is specifically used for:
Merge to merge between combination, second group according to semantic relation, between determining first group and merge combination between combination and third group, Wherein, it includes the human body group and the first vehicle group that combination is merged between described first group, and combination packet is merged between described second group The human body group and the second vehicle group are included, it includes the human body group and the third vehicle group that combination is merged between the third group.
Optionally, merge submodule between described group, comprising:
Cart position comparing unit, for detecting the second class vehicle for combination is merged between described second group The positional relationship of the body frame of interior main body testing result is organized in the cart frame of vehicle detection result and the human body group;
The first determination unit of cart, if for including the body frame in the cart frame, by the cart frame The vehicle detection result of corresponding second class vehicle is as subject detection between group as a result, the body frame for including by the cart frame Corresponding group of interior main body testing result and group inner assembly testing result are as component detection result between group;
The second determination unit of cart, if for not including the body frame in the cart frame, by the cart The vehicle detection result of the corresponding second class vehicle of frame is as subject detection between group as a result, component detection result is sky between group;
Cart third determination unit is not included in the cart frame for the body frame, by the body frame Corresponding group of interior main body testing result is as subject detection between group as a result, by corresponding group of inner assembly testing result of the body frame As component detection result between group;
Combining unit between second vehicle group, for respectively by component is examined between subject detection result and corresponding group between each described group It surveys result to merge, obtains merging testing result between the group of the second vehicle group.
Optionally, merge submodule between described group, comprising:
Three-wheel truck position comparing unit, for detecting the third class vehicle for combination is merged between the third group The positional relationship of the body frame of interior main body testing result is organized in the tricycle frame of vehicle detection result and the human body group;
The first determination unit of tricycle, if for including the body frame in the tricycle frame, by the tricycle frame The vehicle detection result of corresponding third class vehicle is as subject detection between group as a result, the body frame for including by the tricycle frame Merge testing result in corresponding group as component detection result between group;
The second determination unit of tricycle, if for not including the body frame in the tricycle frame, by the tricycle The vehicle detection result of the corresponding third class vehicle of frame is as subject detection between group as a result, component detection result is sky between group;
Tricycle third determination unit, if being not included in the tricycle frame for the body frame, by the main body Corresponding group of interior main body testing result of frame is as subject detection between group as a result, by corresponding group of inner assembly detection knot of the body frame Fruit is as component detection result between group;
Combining unit between third vehicle group, for respectively by component is examined between subject detection result and corresponding group between each described group It surveys result to merge, obtains merging testing result between the group of the third vehicle group.
Optionally, merge submodule between described group, comprising:
A kind of vehicle location comparing unit, for detecting first Che Zuzhong for combination is merged between described first group The positional relationship of the body frame of interior main body testing result is organized in the body frame and the human body group of group interior main body testing result;
A kind of the first determination unit of vehicle, if for being wrapped in the body frame of group interior main body testing result in the first vehicle group Containing the body frame for organizing interior main body testing result in the human body group, using the group interior main body testing result of the first vehicle group as group Between subject detection as a result, by testing result is merged in the group of the group inner assembly testing result of the first vehicle group and the human body group As component detection result between group;
A kind of the second determination unit of vehicle, if in the first vehicle group organize interior main body testing result body frame in not Comprising in the human body group organize interior main body testing result body frame, using the group interior main body testing result of the first vehicle group as Subject detection between group is as a result, using the group inner assembly testing result of the first vehicle group as component detection result between group;
A kind of vehicle third determination unit, if the body frame for organizing interior main body testing result in the human body group is not It include to detect the group interior main body of the human body group in the body frame for organize in the first vehicle group interior main body testing result As a result as subject detection between group as a result, using the group inner assembly testing result of the human body group as component detection result between group;
Combining unit between first vehicle group, for respectively by component is examined between subject detection result and corresponding group between each described group It surveys result to merge, obtains merging testing result between the group of the first vehicle group.
The third aspect, the embodiment of the invention provides a kind of electronic equipment, including processor and memory,
The memory, for storing computer program;
The processor when for executing the program stored on the memory, realizes any institute of above-mentioned first aspect The image analysis method stated.
Fourth aspect, the embodiment of the invention provides a kind of computer readable storage medium, the computer-readable storage Dielectric memory contains computer program, and the computer program realizes that above-mentioned first aspect is any described when being executed by processor Image analysis method.
Image analysis method, device, electronic equipment and storage medium provided in an embodiment of the present invention, which comprises Obtain image to be detected;By goal-selling detection algorithm, described image to be detected is detected, obtains multiple object detection results; The default object detection results for merging rule will be met, merged according to the default merging rule, target is obtained and merge inspection Survey result;It exports the target and merges testing result.
In the embodiment of the present invention, the default object detection results for merging rule will be met and merged, each mesh can be enhanced The connection between testing result is marked, rich image analysis is as a result, subsequent can directly be handled target merging testing result, just Just the subsequent processing of image, while reducing the subsequent target number for needing to track, reduce the calculation amount of succeeding target tracking.When So, it implements any of the products of the present invention or method does not necessarily require achieving all the advantages described above at the same time.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with It obtains other drawings based on these drawings.
Fig. 1 is a kind of flow diagram of image analysis method of the embodiment of the present invention;
Fig. 2 is a kind of another flow diagram of image analysis method of the embodiment of the present invention;
Fig. 3 a is that there are one kind of inclusion relation with detection block 2 for the detection block 1 of image analysis method of the embodiment of the present invention Schematic diagram;
Fig. 3 b is that the detection block 1 of the image analysis method of the embodiment of the present invention and detection block 2 are not present the one of inclusion relation Kind schematic diagram;
Fig. 4 is a kind of schematic diagram for merging testing result in the human body group group of the image analysis method of the embodiment of the present invention;
Fig. 5 is a kind of another flow diagram of image analysis method of the embodiment of the present invention;
Fig. 6 is a kind of another flow diagram of image analysis method of the embodiment of the present invention;
Fig. 7 is a kind of signal for merging testing result in the first vehicle group group of the image analysis method of the embodiment of the present invention Figure;
Fig. 8 is a kind of another flow diagram of image analysis method of the embodiment of the present invention;
Fig. 9 merges the first schematic diagram of testing result between the group of the image analysis method of the embodiment of the present invention;
Figure 10 is a kind of another flow diagram of image analysis method of the embodiment of the present invention;
Figure 11 merges second of schematic diagram of testing result between the group of the image analysis method of the embodiment of the present invention;
Figure 12 is a kind of another flow diagram of image analysis method of the embodiment of the present invention;
Figure 13 merges the third schematic diagram of testing result between the group of the image analysis method of the embodiment of the present invention;
Figure 14 is a kind of another flow diagram of image analysis method of the embodiment of the present invention;
Figure 15 is a kind of structural schematic diagram of image analysis apparatus of the embodiment of the present invention;
Figure 16 is the structural schematic diagram of a kind of electronic equipment of the embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall within the protection scope of the present invention.
In relevant image analysis method, using algorithm of target detection, each mesh to be detected in monitoring image is extracted respectively Target object detection results.But in this way, the object detection results for extracting each target to be detected respectively, lead to figure It is single as analyzing result, connection is lacked between each object detection results, it has not been convenient to subsequent analysis, and a large amount of scattered testing result meetings The target number for needing to track is greatly increased, the calculation amount of succeeding target tracking is increased.
In view of this, the embodiment of the invention provides a kind of image analysis methods, referring to Fig. 1, this method comprises:
S101 obtains image to be detected.
Image analysis method in the embodiment of the present invention can realize that analysis system is arbitrarily can be real by analysis system The system of the image analysis method of the existing embodiment of the present invention.For example, analysis system can be a kind of equipment, it can be camera shooting e.g. Machine, desktop computer, intelligent mobile terminal etc..
In embodiments of the present invention, analysis system obtains image to be detected, can obtain in storage medium for analysis system Image to be detected, or analysis system obtain connection image capture device transmission image to be detected.It is in analysis When system is video camera, image to be detected can also be acquired for analysis system itself.
S102 detects image to be detected by preset algorithm of target detection, obtains multiple target detection knots Fruit.
Preset algorithm of target detection is the algorithm that can arbitrarily identify specified target, such as Boosting, RCNN (Regions Convolutional Neural Network)、FRCNN(Fast Region Convolutional Neural Network)、FasterRCNN(Faster Region Convolutional Neural Network)、SSD(Single Shot MultiBox Detector) and DPM (Deformable Parts Model) etc..Specified target needs to know to be preset Other target, for example, wheel number is no less than 4 vehicle, license plate, cart, tricycle, face, human body, head and shoulder etc..Target inspection Surveying includes detection block in result.
Analysis system examines the specified target of types multiple in image to be detected by preset algorithm of target detection It surveys, obtains multiple object detection results.Such as by goal-selling detection algorithm, not to all wheel numbers in image to be detected Vehicle and license plate less than 4 are detected, and the target detection knot that all wheel numbers in image to be detected are no less than 4 vehicle is obtained The object detection results of fruit and all license plates.
S103 merges multiple object detection results according to default merging rule, obtains target and merge testing result.
The default rule that merges is any rule for merging object detection results.It optionally, can be according to semantic relation to each Object detection results merge, for example, in multiple object detection results include human detection result, number of people testing result, When head and shoulder testing result and Face datection result, because of human detection result, number of people testing result, head and shoulder testing result and face Testing result is all the detection to " people ", therefore can be merged.It optionally, can also be according to the sky of each object detection results Between position, object detection results are merged, for example, in the detection block of an object detection results comprising other targets examine When surveying the detection block of result, these object detection results can be merged.Certainly semantic relation and space be can be combined with Position merges each object detection results.
In embodiments of the present invention, the default object detection results for merging rule will be met to merge, is can be enhanced each Connection between object detection results, rich image analysis as a result, it is subsequent can directly to target merge testing result handle, Facilitate the subsequent processing of image, while reducing the subsequent target number for needing to track, reduces the calculation amount of succeeding target tracking.
Optionally, referring to fig. 2, above-mentioned that multiple object detection results are merged according to default merging rule, obtain mesh Mark merge testing result the step of include:
Multiple object detection results are grouped by S1031 according to default rule of classification, obtain multiple testing results point Group.
Default rule of classification is arbitrary rule of classification, for example, can according to semantic relation to each object detection results into Row grouping, for example, in multiple object detection results include human detection result, number of people testing result, head and shoulder testing result and When Face datection result, because human detection result, number of people testing result, head and shoulder testing result and Face datection result are all pair The detection of " people ", therefore one group can be divided into;In multiple object detection results include wheel number be no less than 4 vehicle vehicle When testing result and car plate detection result, because the vehicle that wheel number is no less than 4 has license plate, it is possible to which wheel number is many It is divided into one group in the vehicle detection result and car plate detection result of 4 vehicle.
S1032 carries out the object detection results for including in the grouping of each testing result according to rule is merged in preset group Merge, obtains merging testing result in group.
Merging rule in preset group is arbitrarily to merge the rule of each object detection results in same grouping.
Optionally, according to rule is merged in preset group, the object detection results that the grouping of each testing result includes are carried out Merge, obtain group in merge testing result a step of include:
According to positional relationship, the object detection results that the grouping of each testing result includes are merged, obtain each group Group interior main body testing result and group inner assembly testing result after interior target merging, as merging testing result in group.For example, root According to the positional relationship of the detection block of each object detection results in same grouping, judge be in the detection block of an object detection results The no detection block comprising other object detection results, if being merged comprising if.
Optionally, judge the detection block of two object detection results with the presence or absence of inclusion relation according to the following formula:
Wherein, the detection block of an object detection results is expressed as (x1, y1, w1, h1), and x1 indicates detection block upper left corner x Axial coordinate value, y1 indicate detection block upper left corner y-axis coordinate value, and w1 indicates that the width of detection block, h1 indicate the height of detection block;Separately The detection block of one object detection results is expressed as (x2, y2, w2, h2), and x2 indicates detection block upper left corner x-axis coordinate value, y2 table Show detection block upper left corner y-axis coordinate value, w2 indicates that the width of detection block, h2 indicate the height of detection block.When detection block 1 and detection When frame 2 meets above-mentioned formula (1) and (2) simultaneously, determine that there are inclusion relations with detection block 2 for detection block 1.Detection block 1 includes inspection The schematic diagram for surveying frame 2 is as shown in Figure 3a, and the schematic diagram that detection block 1 does not include detection block 2 is as shown in Figure 3b.
S1033, according to rule is merged between preset group, between the grouping of each testing result, by each object detection results and group Interior merging testing result merges, and obtains merging testing result between group.
Merging rule between preset group is arbitrarily to merge the rule of the object detection results between each grouping.For example, according to each The positional relationship of the detection block of object detection results in grouping merges detection by the object detection results between each grouping and in organizing As a result it merges.
On the basis of the above embodiments, optionally, in a kind of embodiment of the embodiment of the present invention, according to preset group Between merge rule, each testing result grouping between, by each object detection results and group in merge testing result merge, obtain Include: to the step of merging testing result between group
According to positional relationship, between each above-mentioned testing result grouping, detection will be merged in each object detection results and group As a result it merges, obtains between the group after merging between each group between subject detection result and group component detection as a result, closing as between group And testing result.
Component detection is as a result, component detection result is corresponding between one group of group between subject detection result corresponds to one group of group between one group Subject detection result between one group.It only include an object detection results in subject detection result between one group;Group between one group of group Part testing result may include any number of object detection results, such as 0,1,2,3 or 4 etc..Analysis system Each testing result grouping is traversed, the position of the body frame of testing result is merged in the group being respectively compared in different testing result groupings Relationship merges in testing result, by rank between preset group if positional relationship is inclusion relation in each group currently compared Highest group of interior main body testing result is as subject detection between group as a result, each group inner assembly testing result is merged into component between group Testing result, and other group of interior main body testing result in addition to subject detection result between group is added to component detection result between group In.For example, as the body frame a for merging testing result a in the group in testing result grouping a, in the group in testing result grouping b There are inclusion relations by the body frame b of merging testing result b, and are superior to the interior merging of group in group between the group of merging testing result a Between the group of testing result b when rank, the group interior main body testing result of testing result a will be merged in group as subject detection knot between group Fruit;Testing result a will be merged in group to merge with the interior group inner assembly testing result for merging testing result b of group, obtained between group The group interior main body testing result for merging testing result b in group as a result, and be added between group in component detection result by component detection. It is that different testing results is grouped that testing result, which is grouped a from testing result grouping b,.
Rank can be set according to actual needs between preset group, optionally, the sequence of rank from high to low between group It is followed successively by the first vehicle group, third vehicle group, the second vehicle group and human body group.
If the interior body frame for merging testing result of a group and other interior body frames for merging testing result of any group are equal There is no inclusion relations, then enable the group interior main body testing result for merging testing result in the group merge testing result between group, enable The group inner assembly testing result for merging testing result in the group is component detection result between corresponding group.
In embodiments of the present invention, it will be merged testing result is merged in each group according to positional relationship, be obtained between group Merge testing result.The connection between each object detection results can be enhanced, rich image is analyzed as a result, subsequent can be directly to mesh Mark merges testing result and is handled, and facilitates the subsequent processing of image, while reducing the subsequent target number for needing to track, drop The calculation amount of low succeeding target tracking.
S1034 will merge testing result between each group, merge testing result as target.
Analysis system will merge testing result as final target and merge testing result between group, and exports target and merge inspection Survey result.
In embodiments of the present invention, each object detection results are grouped, and are grouped between interior and grouping respectively Merge, obtain target and merge testing result, can be enhanced the connection between each object detection results, rich image analysis as a result, after It is continuous testing result directly to be merged to target and handle, facilitate the subsequent processing of image, while reduce it is subsequent need with The target number of track reduces the calculation amount of succeeding target tracking.
Optionally, according to default rule of classification, multiple object detection results are grouped, obtain multiple testing results point Group the step of include:
In above-mentioned multiple object detection results, by human detection result, head and shoulder testing result, number of people testing result and people Face testing result is referred to human body group, by the vehicle detection result of first kind vehicle and the car plate detection knot of above-mentioned first kind vehicle Fruit is referred to the first vehicle group, the vehicle detection result of the second class vehicle is referred to the second vehicle group, by the vehicle of third class vehicle Testing result is referred to third vehicle group, wherein above-mentioned first kind vehicle is the vehicle that wheel count is no less than 4, above-mentioned second class Vehicle is the vehicle that wheel count is 2, and above-mentioned third class vehicle is the vehicle that wheel number is 3.
When the image analysis method of the embodiment of the present invention is for when analyzing Traffic Surveillance Video, object detection results can be Human detection result, head and shoulder testing result, number of people testing result, Face datection result, vehicle detection result, car plate detection knot The vehicle detection result of fruit, the vehicle detection result of the second class vehicle and third class vehicle.According to default rule of classification by human body Testing result, head and shoulder testing result, number of people testing result and Face datection result are referred to human body group, according to wheel count by vehicle Testing result and car plate detection result are classified as the first vehicle group, and the vehicle detection result of the second class vehicle is referred to the second vehicle The vehicle detection result of third class vehicle is referred to third vehicle group by group.Coping with image to be detected is Traffic Surveillance Video The connection in image to be detected of Traffic Surveillance Video between object detection results, rich image can be enhanced in the situation of middle image Analyze result.
Optionally, according to rule is merged in preset group, the object detection results that the grouping of each testing result includes are carried out Merge, obtain group in merge testing result a step of include:
According to positional relationship, the object detection results that the grouping of each testing result includes are merged, obtain each group Group interior main body testing result and group inner assembly testing result after interior target merging, as merging testing result in group.
In embodiments of the present invention, the merging that testing result is grouped interior object detection results is carried out according to positional relationship, it can To enhance the connection between each object detection results, rich image analysis is as a result, subsequent directly can merge testing result to target It is handled, facilitates the subsequent processing of image, while reducing the subsequent target number for needing to track, reduce succeeding target tracking Calculation amount.
It optionally, include human testing in multiple object detection results in the image analysis method of the embodiment of the present invention As a result, head and shoulder testing result, number of people testing result and Face datection as a result, testing result grouping include human body group when, correspondingly, It is above-mentioned according to positional relationship, the object detection results that the grouping of each testing result includes are merged, mesh in each group is obtained Group interior main body testing result and group inner assembly testing result after mark merging include: as the step of merging testing result in group
Step 1, according to goal-selling frame method of adjustment, adjusts human body frame in each human detection result in human body group Height and number of people testing result in number of people frame size.
Goal-selling frame method of adjustment is the method for the detection block of any adjustment object detection results, for example, for human body Testing result keeps human body frame upper left corner x-axis coordinate, upper left corner y-axis coordinate and the width of human detection result constant, by human body The height of frame obtains height human body frame adjusted multiplied by transformation coefficient a, wherein transformation coefficient a is preset constant, Ke Yigen It is set according to actually detected demand, such as 0.333.For the number of people frame of number of people testing result, according to transformation coefficient b, by people The upper left corner x-axis coordinate of head frame moves up (b-1)/2 to left (b-1)/2, upper left corner y-axis coordinate, and width and height are each From multiplied by transformation coefficient b, size number of people frame adjusted is obtained, wherein transformation coefficient a is preset constant, can be according to reality Border detection demand is set, such as 1.5.
Step 2, according to height human body frame adjusted, the head and shoulder frame of head and shoulder testing result, the size number of people adjusted The positional relationship of frame and the face frame of Face datection result determines the object detection results for belonging to same target subject.
Judge that the detection block of each object detection results in same grouping with the presence or absence of inclusion relation, will be present comprising closing respectively Object detection results of the corresponding object detection results of the detection block of system as same target subject (people).Inclusion relation can lead to It crosses above-mentioned formula (1) and formula (2) is determined, if the detection block of two object detection results meets above-mentioned formula (1) simultaneously With formula (2), then determine that there are inclusion relations.If the detection block 2 of the detection block 1 of object detection results 1 and object detection results 2 There are inclusion relations, and there are inclusion relations for the detection block 2 of object detection results 2 and the detection block 3 of object detection results 3, then No matter the detection block 3 of the detection block 1 of object detection results 1 and object detection results 3 whether there is inclusion relation, all judgement target Testing result 1, object detection results 2 and object detection results 3 are the object detection results of same target subject.
Step 3 is chosen for each target subject and defines highest-ranking object detection results, as the target subject Group interior main body testing result, by other object detection results in addition to subject detection result of the target subject, as the mesh Mark the group inner assembly testing result of main body, wherein define the sequence of rank from high to low successively are as follows: human detection result, head and shoulder Testing result, number of people testing result and Face datection result.
For each target subject, analysis system will define highest-ranking object detection results as the target subject Group interior main body testing result, by remaining object detection results of the target subject, the group inner assembly as the target subject is detected As a result.For each target subject in human body group, the result finally determined may be that human detection result is group interior main body inspection It surveys as a result, organizing inner assembly testing result as one or more in head and shoulder testing result, number of people testing result, Face datection result It is a, it is also possible to for sky;Head and shoulder testing result be group an interior main body testing result, group inner assembly testing result be number of people testing result, One or more of Face datection result, it is also possible to for sky;Number of people testing result is group interior main body testing result, organizes inner assembly Testing result is face testing result or is empty;Or Face datection result is group interior main body testing result, group inner assembly detection knot Fruit is sky.
Step 4 respectively closes the group interior main body testing result of each target subject and group inner assembly testing result And it obtains merging testing result in the group of human body group.
Merging testing result in the group of human body group can be as shown in figure 4, includes head and shoulder frame, number of people frame and face in human body frame Frame, wherein the corresponding human detection result of human body frame is group interior main body testing result, the corresponding head and shoulder testing result of head and shoulder frame, people The corresponding number of people testing result of head frame and the corresponding Face datection result of face frame are group inner assembly testing result.
In embodiments of the present invention, the specific method for merging testing result in the group of determining human body group, Ke Yizeng are given Connection between strong each object detection results, rich image analysis is as a result, subsequent directly can merge testing result progress to target Processing, facilitates the subsequent processing of image, while reducing the subsequent target number for needing to track, and reduces the meter of succeeding target tracking Calculation amount.
It include human testing in multiple object detection results referring to Fig. 5 in a kind of embodiment of the embodiment of the present invention As a result, head and shoulder testing result, number of people testing result and Face datection as a result, testing result grouping include human body group when, correspondingly, It is above-mentioned according to positional relationship, the object detection results that the grouping of each testing result includes are merged, mesh in each group is obtained Group interior main body testing result and group inner assembly testing result after mark merging include: as the step of merging testing result in group
S501 obtains each human detection result in human body group.
Due to that may have multiple people in same image to be detected, in human body group in may include multiple target subjects The object detection results of (people).Each human testing can be obtained as a result, above-mentioned human body is examined by calling human detection result chained list Survey all human detection results saved in same image to be detected in result chained list.
S502 adjusts the height of the human body frame of each human detection result.
The height of human body frame in all human detection results is adjusted, adjustment mode is human body frame height degree multiplied by change Coefficient a is changed, wherein a is constant, such as a=0.333.Keep human body frame upper left corner x-axis coordinate, the upper left corner of human detection result Y-axis coordinate and width are constant, by the high multiplied by transformation coefficient a of human body frame, obtain height human body frame adjusted.
S503 obtains each head and shoulder testing result in human body group.
Each head and shoulder testing result can be obtained by calling head and shoulder testing result chained list, in above-mentioned head and shoulder testing result chained list Save all head and shoulder testing results in same image to be detected.
Whether S504 is judged in the human body frame of each human detection result respectively comprising the head and shoulder frame in head and shoulder testing result.
According to above-mentioned formula (1) and (2), judged between each human body frame and each head and shoulder frame respectively with the presence or absence of comprising closing Comprising the head and shoulder frame in human body frame, otherwise system determines if human body frame and head and shoulder frame meet above-mentioned formula (1) and (2) simultaneously Judgement does not include.S505 is executed if including head and shoulder frame in human body frame, if not including head and shoulder frame in human body frame executes S506.
S505, if human body frame includes head and shoulder frame, using the corresponding human detection result of human body frame as group interior main body inspection It surveys as a result, corresponding group of inner assembly testing result is the corresponding head and shoulder testing result of the head and shoulder frame.
Group interior main body testing result with organize inner assembly testing result be it is mutual corresponding, a group interior main body testing result is only A corresponding group inner assembly testing result, and a group inner assembly testing result only corresponds to a group interior main body testing result.Its In, organizing only includes an object detection results in interior main body testing result, and organizing in inner assembly testing result may include arbitrary number The object detection results of amount, for example, 0,1,2 or 3 etc..
S506, if human body frame does not include head and shoulder frame, using the corresponding human detection result of human body frame as group interior main body Testing result, corresponding group of inner assembly testing result are sky;It is if head and shoulder frame is not included in human body frame simultaneously, head and shoulder frame is corresponding Head and shoulder testing result as a group interior main body testing result, corresponding group of inner assembly testing result is sky.
S507 merges current group interior main body testing result and corresponding group of inner assembly testing result, obtains chained list 1.
By corresponding group of inner assembly of the obtained group interior main body testing result of S505 and S506 and this group of interior main body testing result Testing result merges addition, obtains chained list 1, may include human detection result in chained list 1 to organize an interior main body testing result, Corresponding group of inner assembly testing result is head and shoulder testing result;Human detection result is group interior main body testing result, organizes inner assembly Testing result is sky;And it is group interior main body testing result that head and shoulder, which surveys result, group inner assembly testing result is empty three kinds of situations.
S508 obtains each number of people testing result in human body group.
Each number of people testing result can be obtained by calling number of people testing result chained list, in above-mentioned number of people testing result chained list Save all number of people testing results in same image to be detected.
S509 adjusts the size of the number of people frame of each number of people testing result.
The height of number of people frame in each number of people testing result and wide height are adjusted, adjustment mode be it is wide, high all multiplied by Transformation coefficient b, wherein b is constant, such as b=1.5.For the number of people frame of number of people testing result, according to transformation coefficient b, by people The upper left corner x-axis coordinate of head frame moves up (b-1)/2 to left (b-1)/2, upper left corner y-axis coordinate, and width and height are each From multiplied by transformation coefficient b, size number of people frame adjusted is obtained.
Whether S510 judges in the body frame of the group interior main body testing result in chained list 1 comprising the size number of people adjusted Frame.
The body frame of group interior main body testing result refers to as a group detection for the object detection results of interior main body testing result Frame, such as the human body frame of human detection result etc..Whether judged in body frame according to above-mentioned formula (1) and (2) comprising number of people frame. S511 is executed if including number of people frame in body frame, if not including number of people frame in body frame executes S512.
S511 will be corresponding in the corresponding number of people testing result addition chained list 1 of the number of people frame if in body frame including number of people frame Group inner assembly testing result in.
Include number of people frame in body frame, keeps corresponding group of interior main body testing result of the body frame constant, by the number of people frame Corresponding number of people testing result is added to, in corresponding group of inner assembly testing result of the body frame comprising the number of people frame.
S512 is kept in corresponding group of interior main body testing result of the body frame and group if not including number of people frame in body frame Component detection result is constant, if number of people frame is not included in any body frame, the corresponding number of people testing result of the number of people frame is made For a group interior main body testing result, corresponding group of inner assembly testing result is sky.
S513 merges current group interior main body testing result and corresponding group of inner assembly testing result, obtains chained list 2.
By corresponding group of inner assembly of the obtained group interior main body testing result of S511 and S512 and this group of interior main body testing result Testing result merges addition, obtains chained list 2, may include: that human detection result is tied for group interior main body detection in chained list 2 Fruit, corresponding group of inner assembly testing result are head and shoulder testing result and number of people testing result;Human detection result is group interior main body Testing result, corresponding group of inner assembly testing result are head and shoulder testing result;Human detection result is group interior main body testing result, Corresponding group of inner assembly testing result is number of people testing result;Human detection result is group interior main body testing result, organizes inner assembly Testing result is sky;It is group interior main body testing result that head and shoulder, which surveys result, and group inner assembly testing result is number of people testing result;And head Situations such as it is group interior main body testing result that shoulder, which surveys result, and group inner assembly testing result is empty.
S514 obtains each face testing result in human body group.
Each face testing result can be obtained by calling Face datection result chained list, in above-mentioned Face datection result chained list Save all face testing results in same image to be detected.
S515 judges the face frame for whether including in the body frame of the group interior main body testing result in chained list 2.
Whether judged in body frame according to above-mentioned formula (1) and (2) comprising face frame.If including face frame in body frame S516 is executed, executes S517 if not including face frame in body frame.
The corresponding Face datection result of the face frame is added to accordingly by S516 if including face frame in body frame In group inner assembly testing result.
Include number of people frame in body frame, keeps corresponding group of interior main body testing result of the body frame constant, by the face frame Corresponding Face datection result is added to, in corresponding group of inner assembly testing result of the body frame comprising the face frame.
S517 keeps corresponding group of interior main body testing result of the body frame and organizes interior group if body frame does not include face frame Part testing result is constant, if face frame is not included in any body frame, the corresponding Face datection result of the face frame is made For a group interior main body testing result, corresponding group of inner assembly testing result is sky.
S518 merges current group interior main body testing result and corresponding group of inner assembly testing result, obtains chained list in group.
By corresponding group of inner assembly of the obtained group interior main body testing result of S516 and S517 and this group of interior main body testing result Testing result merges addition, obtains merging testing result in the group of human body group.It, can be by people in order to facilitate storing and inquiring Merge testing result in the group of body group to be saved in the group of human body group in chained list.Then may include: in chained list in the group of human body group Human detection result is group interior main body testing result, and corresponding group of inner assembly testing result is head and shoulder testing result, number of people detection As a result and at least one of Face datection result or corresponding group of inner assembly testing result are sky;It is in group that head and shoulder, which surveys result, Subject detection as a result, corresponding group of inner assembly testing result is at least one of number of people testing result and Face datection result, Or corresponding group of inner assembly testing result is sky;It is group interior main body testing result, corresponding group of inner assembly detection that head and shoulder, which surveys result, As a result it is face testing result or is empty;Face datection result is group interior main body testing result, corresponding group of inner assembly detection knot Situations such as fruit is empty.
In embodiments of the present invention, the specific method for merging testing result in the group of determining human body group, Ke Yizeng are given Connection between strong each object detection results, rich image analysis is as a result, subsequent directly can merge testing result progress to target Processing, facilitates the subsequent processing of image, while reducing the subsequent target number for needing to track, and reduces the meter of succeeding target tracking Calculation amount.
In a kind of embodiment of the embodiment of the present invention, multiple object detection results further include the vehicle of first kind vehicle Testing result and the car plate detection of above-mentioned first kind vehicle are as a result, testing result grouping further includes the first vehicle group, wherein above-mentioned the A kind of vehicle is the vehicle that wheel count is no less than 4.Correspondingly, referring to Fig. 6, according to positional relationship, by each testing result point The object detection results that group includes merge, and obtain the group interior main body testing result after target merges in each group and organize interior group Part testing result, as group in merge testing result the step of include:
S601 detects the vehicle frame of each vehicle detection result and the license plate frame of each car plate detection result in the first Che Zuzhong Positional relationship.
Vehicle detection result can be stored in vehicle detection result chained list, be saved in above-mentioned vehicle detection result chained list All vehicle detection results in same image to be detected.Car plate detection result can be stored in car plate detection result chained list, All car plate detection results in same image to be detected are saved in above-mentioned car plate detection result chained list.Traverse each vehicle detection As a result and each car plate detection as a result, if the vehicle frame of vehicle detection result and the license plate frame of car plate detection result meet simultaneously it is above-mentioned Formula (1) and (2) then determine in the vehicle frame comprising the license plate frame.
S602, if in vehicle frame including license plate frame, using the corresponding vehicle detection result of vehicle frame as group interior main body detection As a result, the corresponding car plate detection result of the license plate frame for including using vehicle frame is as group inner assembly testing result.
S603, if not including license plate frame in vehicle frame, using the corresponding vehicle detection result of vehicle frame as group interior main body inspection It surveys as a result, group inner assembly testing result is sky.
S604, if license plate frame is not included in vehicle frame, using the corresponding car plate detection result of license plate frame as group interior main body Testing result, group inner assembly testing result are sky.
S605 respectively merges each group interior main body testing result and corresponding group inner assembly testing result, obtains the Merge testing result in the group of one vehicle group.
It will be in the obtained group interior main body testing result of S602, S603 and S604 and this group corresponding group of interior main body testing result Component detection result merges addition, obtains merging testing result in each group of the first vehicle group.Merge in the group of first vehicle group Testing result may include: vehicle detection result for group interior main body testing result, and corresponding group of inner assembly testing result is license plate Testing result;Vehicle detection result is group interior main body testing result, and corresponding group of inner assembly testing result is sky;Car plate detection knot Fruit is group interior main body testing result, and corresponding group of inner assembly testing result is empty three kinds of situations.Wherein, vehicle detection result is group Interior main body testing result, corresponding group of inner assembly testing result are that merging testing result can be such as figure in the group of car plate detection result Shown in 7.Optionally, testing result being merged in each group of the first vehicle group can be stored in the group of the first vehicle group in chained list, with side Just it stores and inquires.
In embodiments of the present invention, the specific method for merging testing result in the group for determining the first vehicle group is given, it can be with Enhance the connection between each object detection results, rich image analysis as a result, it is subsequent can directly to target merge testing result into Row processing, facilitates the subsequent processing of image, while reducing the subsequent target number for needing to track, and reduces succeeding target tracking Calculation amount.
In a kind of embodiment of the embodiment of the present invention, according to rule is merged between preset group, it is grouped in each testing result Between, it is merged testing result is merged in each object detection results and group, obtains the step of merging testing result between group packet It includes:
According to positional relationship, between each above-mentioned testing result grouping, detection will be merged in each object detection results and group As a result it merges, obtains between the group after merging between each group between subject detection result and group component detection as a result, closing as between group And testing result.
Component detection is as a result, component detection result is corresponding between one group of group between subject detection result corresponds to one group of group between one group Subject detection result between one group.It only include an object detection results in subject detection result between one group;Group between one group of group Part testing result may include any number of object detection results, such as 0,1,2,3 or 4 etc..Analysis system Each testing result grouping is traversed, the position of the body frame of testing result is merged in the group being respectively compared in different testing result groupings Relationship merges in testing result, by rank between preset group if positional relationship is inclusion relation in each group currently compared Highest group of interior main body testing result is as subject detection between group as a result, each group inner assembly testing result is merged into component between group Testing result, and other group of interior main body testing result in addition to subject detection result between group is added to component detection result between group In.For example, as the body frame a for merging testing result a in the group in testing result grouping a, in the group in testing result grouping b There are inclusion relations by the body frame b of merging testing result b, and are superior to the interior merging of group in group between the group of merging testing result a Between the group of testing result b when rank, the group interior main body testing result of testing result a will be merged in group as subject detection knot between group Fruit;Testing result a will be merged in group to merge with the interior group inner assembly testing result for merging testing result b of group, obtained between group The group interior main body testing result for merging testing result b in group as a result, and be added between group in component detection result by component detection. It is that different testing results is grouped that testing result, which is grouped a from testing result grouping b,.
Rank can be set according to actual needs between preset group, optionally, the sequence of rank from high to low between group It is followed successively by the first vehicle group, third vehicle group, the second vehicle group and human body group.
If the interior body frame for merging testing result of a group and other interior body frames for merging testing result of any group are equal There is no inclusion relations, then enable the group interior main body testing result for merging testing result in the group merge testing result between group, enable The group inner assembly testing result for merging testing result in the group is component detection result between corresponding group.
In embodiments of the present invention, it will be merged testing result is merged in each group according to positional relationship, be obtained between group Merge testing result.The connection between each object detection results can be enhanced, rich image is analyzed as a result, subsequent can be directly to mesh Mark merges testing result and is handled, and facilitates the subsequent processing of image, while reducing the subsequent target number for needing to track, drop The calculation amount of low succeeding target tracking.
Optionally, above-mentioned according to positional relationship, between each above-mentioned testing result grouping, by each object detection results and Merge testing result in group to merge, obtains between the group after merging between each group component detection knot between subject detection result and group Fruit, before merging testing result between group, the above method further include:
According to semantic relation, merging combination between group is determined, wherein merge in combination between same group and detect including at least two As a result it is grouped;
Optionally, above-mentioned multiple object detection results further include the vehicle detection result and third class vehicle of the second class vehicle Vehicle detection as a result, the grouping of above-mentioned testing result further includes the second vehicle group and third vehicle group, wherein above-mentioned second class vehicle is The vehicle that wheel count is 2, above-mentioned third class vehicle is the vehicle that wheel number is 3, above-mentioned according to semantic relation, determines and closes between group And the step of combining, includes:
Merge to merge between combination, second group according to semantic relation, between determining first group and merge combination between combination and third group, Wherein, it includes above-mentioned human body group and above-mentioned first vehicle group that combination is merged between above-mentioned first group, and combination packet is merged between above-mentioned second group Above-mentioned human body group and above-mentioned second vehicle group are included, it includes above-mentioned human body group and above-mentioned third vehicle group that combination is merged between above-mentioned third group.
According to the semantic relation that each testing result is grouped, it will can carry out each testing result merged between group grouping and be added to Merge in combination between same group, and merge each testing result grouping in combination between same group to carry out merging between group.For example, It, can be using the first vehicle group and human body group as merging group between a group when testing result grouping includes the first vehicle group and human body group Close, this is because analyzing from semantic relation, people can drive first kind vehicle, when people drives a kind of vehicle of band, people and The movement rate of a kind of vehicle is consistent, can carry out merging between group.
Correspondingly, it is above-mentioned according to positional relationship, between each above-mentioned testing result grouping, by each object detection results and group Interior merging testing result merges, obtain between the group after merging between each group component detection between subject detection result and group as a result, As merging testing result between group, comprising:
For combination is merged between each group, according to positional relationship, each testing result that combination is merged between the group is grouped it Between, it is merged testing result is merged in each object detection results and group, obtains subject detection between the group after merging between each group As a result component detection is as a result, as testing result is merged between group and between group.
For combination is merged between each group, according to the positional relationship of each detection block merged in combination between the group, by each point Merge testing result in object detection results and group between group to merge.Analysis system merges combination between being respectively compared same group The positional relationship for merging the body frame of testing result in group between middle difference testing result grouping, if positional relationship is comprising closing System, then using highest-ranking group of interior main body testing result between preset group as subject detection between group as a result, by each group inner assembly Testing result merges into component detection between group as a result, and by other group of interior main body testing result in addition to subject detection result between group It is added between group in component detection result.
For example, as the body frame a for merging testing result a in the group in testing result grouping a, in testing result grouping b Group in merge the body frame b of testing result b there are inclusion relation, and merge in organizing and be superior to group between the group of testing result a Between the interior group for merging testing result b when rank, the group interior main body testing result of testing result a will be merged in group as main body between group Testing result;The group inner assembly testing result for merging testing result b in testing result a and group will be merged in group to merge, obtained To component detection between group as a result, and the group interior main body testing result for merging testing result b in group is added to component detection between group As a result in.It is that different testing results is grouped that testing result, which is grouped a from testing result grouping b,.
Rank can be set according to actual needs between preset group, for example, between group the sequence of rank from high to low according to Secondary is the first vehicle group, third vehicle group, the second vehicle group and human body group.
In embodiments of the present invention, it according to semantic relation, determines merging combination between group, is combined in grouping between merging each group Testing result grouping merge between group, can without being respectively compared the positional relationship of detection block between the grouping of all testing results To save computing resource.
Optionally, it referring to Fig. 8, is combined for merging between each group, according to positional relationship, the inspection of combination is merged between the group It surveys between result grouping, merges, obtained after merging between each group by testing result is merged in each object detection results and group Between group between subject detection result and group component detection as a result, as between group merge testing result the step of include:
S801 is combined for merging between second group, detects cart frame and the people of the vehicle detection result of the second class vehicle The positional relationship of the body frame of interior main body testing result is organized in body group.
The vehicle detection result of second class vehicle can be stored in the vehicle detection result chained list of the second class vehicle, above-mentioned The vehicle inspection of all second class vehicles in same image to be detected is saved in the vehicle detection result chained list of second class vehicle Survey result.Analysis system is respectively compared the position of the body frame of each group of interior main body testing result in each cart frame and human body group Set relationship, whether judge in cart frame comprising body frame, for example, if cart frame and body frame meet above-mentioned formula (1) and (2), then determine in cart frame comprising body frame.
S802, if including body frame in cart frame, by the vehicle detection result of the corresponding second class vehicle of cart frame As subject detection between group as a result, corresponding group of interior main body testing result of the body frame for including by cart frame and group inner assembly inspection Result is surveyed as component detection result between group.
S803, if not including body frame in cart frame, by the vehicle detection knot of the corresponding second class vehicle of cart frame Fruit is as subject detection between group as a result, component detection result is sky between group.
S804, if body frame is not included in cart frame, using corresponding group of interior main body testing result of body frame as group Between subject detection as a result, using corresponding group of inner assembly testing result of body frame as component detection result between group.
S805 obtains respectively by component detection result merges between subject detection result and corresponding group between each group Merge testing result between the group of two vehicle groups.
Merging testing result between the group of second vehicle group can be saved between the second vehicle group in chained list.In a practical situation, may be used There can be the case where multiple people multiply a cart altogether, therefore may be interior main comprising group in multiple human body groups in a cart frame The body frame of body testing result, merging testing result between the group of the second vehicle group at this time can be as shown in figure 9, in a cart frame Merge the corresponding detection block of testing result, including human body frame, head and shoulder frame, number of people frame and face frame four detections in the group of n people Frame, wherein n is positive integer.
In embodiments of the present invention, it gives in the vehicle detection result and the group of human body group of the second class vehicle and merges detection As a result the connection between each object detection results can be enhanced in merging method, and rich image analysis is as a result, subsequent can be directly right Target merges testing result and is handled, and facilitates the subsequent processing of image, while reducing the subsequent target number for needing to track, Reduce the calculation amount of succeeding target tracking.
Optionally, it referring to Figure 10, is combined for merging between each group, according to positional relationship, combination is merged between the group Between testing result grouping, merges, obtained after merging between each group by testing result is merged in each object detection results and group Group between subject detection result and group component detection as a result, as between group merge testing result the step of include:
S1001 is combined for merging between third group, detects tricycle frame and the people of the vehicle detection result of third class vehicle The positional relationship of the body frame of interior main body testing result is organized in body group.
The vehicle detection result of third class vehicle can be stored in the vehicle detection result chained list of third class vehicle, above-mentioned The vehicle inspection of all third class vehicles in same image to be detected is saved in the vehicle detection result chained list of third class vehicle Survey result.Analysis system is respectively compared the position of the body frame of each group of interior main body testing result in each tricycle frame and human body group Set relationship, whether judge in tricycle frame comprising body frame, for example, if tricycle frame and body frame meet above-mentioned formula (1) and (2), then determine in tricycle frame comprising body frame.
S1002, if including body frame in tricycle frame, by the vehicle detection result of the corresponding third class vehicle of tricycle frame As subject detection between group as a result, corresponding group of interior main body testing result of the body frame for including by tricycle frame and group inner assembly inspection Result is surveyed as component detection result between group.
S1003, if not including body frame in tricycle frame, by the vehicle detection knot of the corresponding third class vehicle of tricycle frame Fruit is as subject detection between group as a result, component detection result is sky between group.
S1004, if body frame is not included in tricycle frame, using corresponding group of interior main body testing result of body frame as group Between subject detection as a result, using corresponding group of inner assembly testing result of body frame as component detection result between group.
S1005 obtains respectively by component detection result merges between subject detection result and corresponding group between each group Merge testing result between the group of three vehicle groups.
Merging testing result between the group of third vehicle group can be saved between third vehicle group in chained list.In a practical situation, may be used There can be the case where multiple people multiply a tricycle altogether, therefore may be interior main comprising group in multiple human body groups in a tricycle frame The body frame of body testing result, merging testing result between the group of third vehicle group at this time can be as shown in figure 11, a tricycle frame In the corresponding detection block of merging testing result in the group comprising n people, including human body frame, head and shoulder frame, number of people frame and face frame four A detection block, wherein n is positive integer.
In embodiments of the present invention, it gives in the vehicle detection result and the group of human body group of third class vehicle and merges detection As a result the connection between each object detection results can be enhanced in merging method, and rich image analysis is as a result, subsequent can be directly right Target merges testing result and is handled, and facilitates the subsequent processing of image, while reducing the subsequent target number for needing to track, Reduce the calculation amount of succeeding target tracking.
Optionally, it referring to Figure 12, is combined for merging between each group, according to positional relationship, combination is merged between the group Between testing result grouping, merges, obtained after merging between each group by testing result is merged in each object detection results and group Group between subject detection result and group component detection as a result, as between group merge testing result the step of include:
S1201 is combined for merging between first group, detects body frame and the people that interior main body testing result is organized in the first vehicle group The positional relationship of the body frame of interior main body testing result is organized in body group.
Analysis system is respectively compared each in the body frame of each group of interior main body testing result and human body group in the first vehicle group The positional relationship of the body frame of group interior main body testing result, judge in the first vehicle group group interior main body testing result body frame whether Body frame comprising organizing interior main body testing result in human body group, for example, if organizing the main body of interior main body testing result in the first vehicle group The body frame that interior main body testing result is organized in frame and human body group meets above-mentioned formula (1) and (2), then determines in the first vehicle group in group The body frame of subject detection result includes that the body frame of interior main body testing result is organized in human body group.
S1202, if being organized in the first vehicle group in the body frame of interior main body testing result comprising group interior main body detection in human body group As a result body frame, using the group interior main body testing result of the first vehicle group as subject detection between group as a result, by the group of the first vehicle group Merge testing result in the group of inner assembly testing result and human body group as component detection result between group.
S1203 does not include group interior main body inspection in human body group if organizing in the first vehicle group in the body frame of interior main body testing result The body frame for surveying result, using the group interior main body testing result of the first vehicle group as subject detection between group as a result, by the first vehicle group Group inner assembly testing result is as component detection result between group.
S1204, if the body frame for organizing interior main body testing result in human body group, which is not included in the first vehicle group, organizes interior main body inspection It surveys in the body frame of result, using the group interior main body testing result of human body group as subject detection between group as a result, by the group of human body group Inner assembly testing result is as component detection result between group.
S1205 obtains respectively by component detection result merges between subject detection result and corresponding group between each group Merge testing result between the group of one vehicle group.
Merging testing result between the group of first vehicle group can be saved between the first vehicle group in chained list.In a practical situation, may be used There can be the case where multiple people multiply a first kind vehicle altogether, therefore may be comprising in group in multiple human body groups in a vehicle frame The body frame of subject detection result, merging testing result between the group of the first vehicle group at this time can be as shown in figure 13, a vehicle frame In the corresponding detection block of merging testing result in the group comprising a license plate frame and n people, including human body frame, head and shoulder frame, the number of people Four detection blocks of frame and face frame, wherein n is positive integer.
In embodiments of the present invention, it gives to merge in the group of the first vehicle group in testing result and the group of human body group and merges inspection The merging method for surveying result, can be enhanced the connection between each object detection results, and rich image is analyzed as a result, subsequent can be direct Merge testing result to target to handle, facilitate the subsequent processing of image, while reducing a subsequent target for needing to track Number reduces the calculation amount of succeeding target tracking.
Below according to a specific embodiment, the image analysis method of the embodiment of the present invention is described in detail, is joined See Figure 14, comprising:
S1401 detects image to be detected by preset algorithm of target detection, obtains multiple target detection knots Fruit, and each object detection results are saved in corresponding testing result chained list respectively.
Each object detection results are saved in corresponding testing result chained list respectively, comprising: examine above-mentioned multiple targets The vehicle detection result for all second class vehicles surveyed in result is saved in the vehicle detection result chained list of the second class vehicle;It will All face testing results in above-mentioned multiple object detection results are saved in Face datection result chained list;By above-mentioned multiple mesh All number of people testing results in mark testing result are saved in number of people testing result chained list;By above-mentioned multiple object detection results In all head and shoulder testing results be saved in head and shoulder testing result chained list;By the owner in above-mentioned multiple object detection results Body testing result is saved in human detection result chained list;By all third class vehicles in above-mentioned multiple object detection results Vehicle detection result is saved in the vehicle detection result chained list of third class vehicle;By the institute in above-mentioned multiple object detection results There is vehicle detection result to be saved in vehicle detection result chained list;By all car plate detections in above-mentioned multiple object detection results As a result it is saved in car plate detection result chained list.
Above-mentioned multiple object detection results are grouped by S1402 according to semantic relation, and to the target in each grouping Testing result merge in group.
According to semantic relation, the vehicle detection result of the second class vehicle is classified as the second vehicle group;By Face datection result, Number of people testing result, head and shoulder testing result and human detection result are classified as human body group;By the vehicle detection knot of third class vehicle Fruit is classified as third vehicle group;Vehicle detection result and car plate detection result are classified as the first vehicle group.And it is directed to human body group, to people Face testing result, number of people testing result, head and shoulder testing result and human detection result merge in group, optionally, can adopt Human body group merge in group with method shown in fig. 5, obtains merging testing result in the group of human body group;For the first vehicle Group merge in group to vehicle detection result and car plate detection result, optionally, can be using method shown in fig. 6 to the One vehicle group merge in group, obtains merging testing result in the group of the first vehicle group.
S1403 carries out merging between group between each grouping, obtains merging testing result between group.
Second Che Zuyu human body group merge between group, each group of interior main body in more each cart frame and human body group Whether the positional relationship of the body frame of testing result judges comprising body frame in cart frame, for example, if cart frame and main body Frame meets above-mentioned formula (1) and (2), then determines in cart frame comprising body frame.If including body frame in cart frame, by two The vehicle detection result of the corresponding second class vehicle of wheel vehicle frame is as subject detection between group as a result, the main body for including by cart frame Corresponding group of interior main body testing result of frame and group inner assembly testing result are as component detection result between group.If in cart frame not Comprising body frame, using the vehicle detection result of the corresponding second class vehicle of cart frame as subject detection between group as a result, between group Component detection result is sky.
Third Che Zuyu human body group merge between group, each group of interior main body in more each tricycle frame and human body group Whether the positional relationship of the body frame of testing result judges comprising body frame in tricycle frame, for example, if tricycle frame and main body Frame meets above-mentioned formula (1) and (2), then determines in tricycle frame comprising body frame.If including body frame in tricycle frame, by three The vehicle detection result of the corresponding third class vehicle of wheel vehicle frame is as subject detection between group as a result, the main body for including by tricycle frame Corresponding group of interior main body testing result of frame and group inner assembly testing result are as component detection result between group.If in tricycle frame not Comprising body frame, using the vehicle detection result of the corresponding third class vehicle of tricycle frame as subject detection between group as a result, between group Component detection result is sky.
First Che Zuyu human body group merge between group, the master of each group of interior main body testing result in the first vehicle group is compared The positional relationship of the body frame of each group of interior main body testing result in body frame and human body group judges to organize interior main body inspection in the first vehicle group Whether the body frame for surveying result includes the body frame that interior main body testing result is organized in human body group, for example, if in the first vehicle group in group The body frame that interior main body testing result is organized in the body frame and human body group of subject detection result meets above-mentioned formula (1) and (2), then Determine that the body frame that interior main body testing result is organized in the first vehicle group includes that the body frame of interior main body testing result is organized in human body group.If It is organized in first vehicle group in the body frame of interior main body testing result comprising the body frame for organizing interior main body testing result in human body group, by the The group interior main body testing result of one vehicle group is as subject detection between group as a result, by the group inner assembly testing result of the first vehicle group and people Merge testing result in the group of body group as component detection result between group.If organizing the main body of interior main body testing result in the first vehicle group The body frame that interior main body testing result is organized in human body group is not included in frame, using the group interior main body testing result of the first vehicle group as group Between subject detection as a result, using the group inner assembly testing result of the first vehicle group as component detection result between group.
If the body frame for organizing interior main body testing result in human body group is not included in group interior main body testing result in the first vehicle group Body frame in, the body frame that interior main body testing result is organized in human body group is not included in cart frame, and in human body group in group The body frame of subject detection result is not included in tricycle frame, using the group interior main body testing result of human body group as main body between group Testing result, using the group inner assembly testing result of human body group as component detection result between group.
For subject detection between each group as a result, subject detection result pair between subject detection result and the group between merging the group Component detection between the group answered as a result, obtaining group between merge testing result.Merging testing result between group can be with are as follows: vehicle detection result The subject detection between group as a result, between group component detection result be human detection result, head and shoulder testing result, number of people testing result, One or more in Face datection result, car plate detection result, it is also possible to for sky;Human detection result subject detection between group As a result, component detection result is head and shoulder testing result, number of people testing result, one or more in Face datection result between group, It may be sky;Head and shoulder testing result be between group subject detection as a result, component detection result is number of people testing result, face inspection between group Survey one or more in result, it is also possible to for sky;Number of people testing result between group subject detection as a result, component detection knot between group Fruit is face testing result or is empty;Face datection result be between group subject detection as a result, component detection result is empty between group;The The vehicle detection result of two class vehicles be between group subject detection as a result, component detection result is human detection result, head and shoulder between group Testing result, number of people testing result, one or more in Face datection result, it is also possible to for sky;The vehicle of third class vehicle is examined Survey result be between group subject detection as a result, component detection result is human detection result, head and shoulder testing result, number of people detection between group As a result, one or more in Face datection result, it is also possible to for sky.
The image analysis method of the embodiment of the present invention, human detection result, head and shoulder inspection in available image to be detected Survey the vehicle inspection of result, number of people testing result, Face datection result, vehicle detection result, car plate detection result, the second class vehicle A variety of testing results such as result, the vehicle detection result of third class vehicle are surveyed, while each object detection results being merged, are obtained To group between merge testing result, have certain semanteme.Such as a target: if merging the group of testing result between group Between subject detection result be human testing as a result, existing simultaneously component detection result between group is number of people testing result, head and shoulder detection As a result, one of Face datection result or a variety of can then indicate that the target is the target that a classification is " people ", while the mesh There is also one of the numbers of people, head and shoulder, face or a variety of for mark;If merging subject detection result between the group of testing result between group For vehicle detection as a result, existing simultaneously component detection result between group is car plate detection as a result, can then indicate that the target is a class Not Wei " vehicle " target, while there are also license plate, further, if between group in component detection result further including the target of human body group Testing result, then it represents that somebody in the vehicle.Comprehensive analysis is carried out to the target in video, and to the language between target Adopted relationship is described.
Correspondingly, referring to Figure 15, which includes: the embodiment of the invention also provides a kind of image analysis apparatus
Image collection module 1501, for obtaining image to be detected;
Module of target detection 1502, for being detected to above-mentioned image to be detected by preset algorithm of target detection, Obtain multiple object detection results;
As a result merging module 1503, for being merged according to default merging rule to above-mentioned multiple object detection results, It obtains target and merges testing result.
In embodiments of the present invention, the default object detection results for merging rule will be met to merge, is can be enhanced each Connection between object detection results, rich image analysis as a result, it is subsequent can directly to target merge testing result handle, Facilitate the subsequent processing of image, while reducing the subsequent target number for needing to track, reduces the calculation amount of succeeding target tracking.
In a kind of embodiment of the embodiment of the present invention, the above results merging module 1503 includes:
As a result it is grouped submodule, for above-mentioned multiple object detection results being grouped, are obtained according to default rule of classification It is grouped to multiple testing results;
Merge submodule in group, for will include in each above-mentioned testing result grouping according to rule is merged in preset group Object detection results merge, obtain group in merge a testing result;
Merge submodule between group, it, will be each between each above-mentioned testing result grouping for regular according to merging between preset group Merge testing result in object detection results and group to merge, obtains merging testing result between group;
As a result it determines submodule, for testing result will to be merged between each above-mentioned group, merges testing result as target.
In a kind of embodiment of the embodiment of the present invention, the above results are grouped submodule, are specifically used for:
In above-mentioned multiple object detection results, by human detection result, head and shoulder testing result, number of people testing result and people Face testing result is referred to human body group, by the vehicle detection result of first kind vehicle and the car plate detection knot of above-mentioned first kind vehicle Fruit is referred to the first vehicle group, the vehicle detection result of the second class vehicle is referred to the second vehicle group, by the vehicle of third class vehicle Testing result is referred to third vehicle group, wherein above-mentioned first kind vehicle is the vehicle that wheel count is no less than 4, above-mentioned second class Vehicle is the vehicle that wheel count is 2, and above-mentioned third class vehicle is the vehicle that wheel number is 3.
In a kind of embodiment of the embodiment of the present invention, submodule is merged in above-mentioned group, is specifically used for:
According to positional relationship, the object detection results that each above-mentioned testing result grouping includes are merged, are obtained every Group interior main body testing result and group inner assembly testing result after target merges in a group, as merging testing result in group.
In a kind of embodiment of the embodiment of the present invention, above-mentioned multiple object detection results include human detection result, Head and shoulder testing result, number of people testing result and Face datection are as a result, the grouping of above-mentioned testing result includes human body group;On correspondingly, Stating merging submodule in group includes:
Detection block adjustment unit, for according to goal-selling frame method of adjustment, adjusting each above-mentioned in above-mentioned human body group In human detection result in the height of human body frame and the above-mentioned number of people testing result number of people frame size;
Human body group position comparing unit, for the head and shoulder according to height human body frame adjusted, above-mentioned head and shoulder testing result The positional relationship of frame, size number of people frame adjusted and the face frame of above-mentioned Face datection result, determines to belong to same target The object detection results of main body;
Human body group main body determination unit is chosen for being directed to each above-mentioned target subject and defines highest-ranking target inspection The group interior main body testing result as a result, as above-mentioned target subject is surveyed, above-mentioned target subject is removed into aforementioned body testing result Other outer object detection results, the group inner assembly testing result as above-mentioned target subject, wherein above-mentioned definition rank is by height Successively to low sequence are as follows: human detection result, head and shoulder testing result, number of people testing result and Face datection result;
Combining unit in human body group group, for respectively will be in the group interior main body testing result and group of each above-mentioned target subject Component detection result merges, and obtains merging testing result in the group of above-mentioned human body group.
In a kind of embodiment of the embodiment of the present invention, above-mentioned multiple object detection results further include first kind vehicle Vehicle detection result and car plate detection are as a result, the grouping of above-mentioned testing result further includes the first vehicle group, wherein above-mentioned first kind vehicle 4 vehicle is no less than for wheel count;Correspondingly, merging submodule includes: in above-mentioned group
First vehicle group group position comparing unit, for detecting each above-mentioned vehicle detection result in above-mentioned first Che Zuzhong The positional relationship of vehicle frame and the license plate frame of each above-mentioned car plate detection result;
First main body determination unit, if for including above-mentioned license plate frame in above-mentioned vehicle frame, above-mentioned vehicle frame is corresponding Vehicle detection result as group interior main body testing result, make by the corresponding car plate detection result of the license plate frame for including by above-mentioned vehicle frame For a group inner assembly testing result;
Second main body determination unit, if for not including above-mentioned license plate frame in above-mentioned vehicle frame, above-mentioned vehicle frame is corresponding Vehicle detection result as group an interior main body testing result, group inner assembly testing result be sky;
Third main body determination unit, if being not included in above-mentioned vehicle frame for above-mentioned license plate frame, by above-mentioned license plate frame pair The car plate detection result answered is sky as group interior main body testing result, group inner assembly testing result;
Combining unit in first vehicle group group, for organizing inner assembly by each above-mentioned group of interior main body testing result and accordingly respectively Testing result merges, and obtains merging testing result in the group of above-mentioned first vehicle group.
In a kind of embodiment of the embodiment of the present invention, merges submodule between above-mentioned group, is specifically used for:
According to positional relationship, between each above-mentioned testing result grouping, detection will be merged in each object detection results and group As a result it merges, obtains between the group after merging between each group between subject detection result and group component detection as a result, closing as between group And testing result.
In a kind of embodiment of the embodiment of the present invention, merges submodule between above-mentioned group, is specifically used for:
According to positional relationship, between each above-mentioned testing result grouping, detection will be merged in each object detection results and group As a result it merges, obtains between the group after merging between each group between subject detection result and group component detection as a result, closing as between group And testing result.
In a kind of embodiment of the embodiment of the present invention, above-mentioned image analysis apparatus, further includes:
Determining module is combined, for determining merging combination between group, wherein merge combination between same group according to semantic relation In include at least the grouping of two testing results;
Merge submodule between above-mentioned group, is specifically used for for merging combination between each group, according to positional relationship, between the group Merge between each testing result grouping of combination, merges, obtain by testing result is merged in each object detection results and group Between each group merge after group between subject detection result and group component detection as a result, as testing result is merged between group.
In a kind of embodiment of the embodiment of the present invention, above-mentioned multiple object detection results further include the second class vehicle Vehicle detection result and the vehicle detection of third class vehicle are as a result, the grouping of above-mentioned testing result further includes the second vehicle group and third vehicle Group, wherein above-mentioned second class vehicle is the vehicle that wheel count is 2, and above-mentioned third class vehicle is the vehicle that wheel number is 3;
Determining module is combined, is specifically used for:
Merge to merge between combination, second group according to semantic relation, between determining first group and merge combination between combination and third group, Wherein, it includes human body group and the first vehicle group that combination is merged between first group, and it includes human body group and the second vehicle that combination is merged between second group Group, it includes human body group and third vehicle group that combination is merged between third group.
In a kind of embodiment of the embodiment of the present invention, merge submodule between above-mentioned group, comprising:
Cart position comparing unit, for detecting above-mentioned second class vehicle for combination is merged between above-mentioned second group The positional relationship of the body frame of interior main body testing result is organized in the cart frame of vehicle detection result and above-mentioned human body group;
The first determination unit of cart, if for including aforementioned body frame in above-mentioned cart frame, by above-mentioned cart frame The vehicle detection result of corresponding second class vehicle is as subject detection between group as a result, the body frame for including by above-mentioned cart frame Corresponding group of interior main body testing result and group inner assembly testing result are as component detection result between group;
The second determination unit of cart, if for not including aforementioned body frame in above-mentioned cart frame, by above-mentioned cart The vehicle detection result of the corresponding second class vehicle of frame is as subject detection between group as a result, component detection result is sky between group;
Cart third determination unit is not included in above-mentioned cart frame for aforementioned body frame, by aforementioned body frame Corresponding group of interior main body testing result is as subject detection between group as a result, by corresponding group of inner assembly testing result of aforementioned body frame As component detection result between group;
Combining unit between second vehicle group, for respectively by component is examined between subject detection result and corresponding group between each above-mentioned group It surveys result to merge, obtains merging testing result between the group of above-mentioned second vehicle group.
In a kind of embodiment of the embodiment of the present invention, merge submodule between above-mentioned group, comprising:
Three-wheel truck position comparing unit, for detecting above-mentioned third class vehicle for combination is merged between above-mentioned third group The positional relationship of the body frame of interior main body testing result is organized in the tricycle frame of vehicle detection result and above-mentioned human body group;
The first determination unit of tricycle, if for including aforementioned body frame in above-mentioned tricycle frame, by above-mentioned tricycle frame The vehicle detection result of corresponding third class vehicle is as subject detection between group as a result, the body frame for including by above-mentioned tricycle frame Merge testing result in corresponding group as component detection result between group;
The second determination unit of tricycle, if for not including aforementioned body frame in above-mentioned tricycle frame, by above-mentioned tricycle The vehicle detection result of the corresponding third class vehicle of frame is as subject detection between group as a result, component detection result is sky between group;
Tricycle third determination unit, if being not included in above-mentioned tricycle frame for aforementioned body frame, by aforementioned body Corresponding group of interior main body testing result of frame is as subject detection between group as a result, by corresponding group of inner assembly detection knot of aforementioned body frame Fruit is as component detection result between group;
Combining unit between third vehicle group, for respectively by component is examined between subject detection result and corresponding group between each above-mentioned group It surveys result to merge, obtains merging testing result between the group of above-mentioned third vehicle group.
In a kind of embodiment of the embodiment of the present invention, merge submodule between above-mentioned group, comprising:
A kind of vehicle location comparing unit, for detecting above-mentioned first Che Zuzhong for combination is merged between above-mentioned first group The positional relationship of the body frame of interior main body testing result is organized in the body frame and above-mentioned human body group of group interior main body testing result;
A kind of the first determination unit of vehicle, if for being wrapped in the body frame of group interior main body testing result in above-mentioned first vehicle group Containing the body frame for organizing interior main body testing result in above-mentioned human body group, using the group interior main body testing result of above-mentioned first vehicle group as group Between subject detection as a result, by testing result is merged in the group of the group inner assembly testing result of above-mentioned first vehicle group and above-mentioned human body group As component detection result between group;
A kind of the second determination unit of vehicle, if in above-mentioned first vehicle group organize interior main body testing result body frame in not Comprising in above-mentioned human body group organize interior main body testing result body frame, using the group interior main body testing result of above-mentioned first vehicle group as Subject detection between group is as a result, using the group inner assembly testing result of above-mentioned first vehicle group as component detection result between group;
A kind of vehicle third determination unit, if the body frame for organizing interior main body testing result in above-mentioned human body group does not include In above-mentioned first vehicle group organize interior main body testing result body frame in, using the group interior main body testing result of above-mentioned human body group as Subject detection between group is as a result, using the group inner assembly testing result of above-mentioned human body group as component detection result between group;
Combining unit between first vehicle group, for respectively by component is examined between subject detection result and corresponding group between each above-mentioned group It surveys result to merge, obtains merging testing result between the group of above-mentioned first vehicle group.
Correspondingly, the embodiment of the invention also provides a kind of electronic equipment, as shown in figure 16, including processor 1601 and deposit Reservoir 1602,
Memory 1602, for storing computer program;
Processor 1601 when for executing the program stored on memory 1602, realizes following steps:
Obtain image to be detected;
By preset algorithm of target detection, above-mentioned image to be detected is detected, obtains multiple object detection results;
Above-mentioned multiple object detection results are merged according to default merging rule, target is obtained and merges testing result.
In embodiments of the present invention, the default object detection results for merging rule will be met to merge, is can be enhanced each Connection between object detection results, rich image analysis as a result, it is subsequent can directly to target merge testing result handle, Facilitate the subsequent processing of image, while reducing the subsequent target number for needing to track, reduces the calculation amount of succeeding target tracking.
Optionally, processor 1601 when for executing the program stored on memory 1602, can also realize above-mentioned One image analysis method.
The memory that above-mentioned electronic equipment is mentioned may include random access memory (Random Access Memory, It RAM), also may include nonvolatile memory (Non-Volatile Memory, NVM), for example, at least a disk storage Device.Optionally, memory can also be that at least one is located remotely from the storage device of aforementioned processor.
Above-mentioned processor can be general processor, including central processing unit (Central Processing Unit, CPU), network processing unit (Network Processor, NP) etc.;It can also be digital signal processor (Digital Signal Processing, DSP), it is specific integrated circuit (Application Specific Integrated Circuit, ASIC), existing It is field programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic device, discrete Door or transistor logic, discrete hardware components.
The embodiment of the invention provides a kind of computer readable storage medium, storage in the computer readable storage medium There is computer program, the computer program realizes following steps when being executed by processor:
Obtain image to be detected;
By preset algorithm of target detection, above-mentioned image to be detected is detected, obtains multiple object detection results;
Above-mentioned multiple object detection results are merged according to default merging rule, target is obtained and merges testing result.
In embodiments of the present invention, the default object detection results for merging rule will be met to merge, is can be enhanced each Connection between object detection results, rich image analysis as a result, it is subsequent can directly to target merge testing result handle, Facilitate the subsequent processing of image, while reducing the subsequent target number for needing to track, reduces the calculation amount of succeeding target tracking.
Optionally, it when the computer program stored in computer readable storage medium is executed by processor, can also realize Any of the above-described image analysis method.
It should be noted that, in this document, relational terms such as first and second and the like are used merely to a reality Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation In any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to Non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those Element, but also including other elements that are not explicitly listed, or further include for this process, method, article or equipment Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that There is also other identical elements in process, method, article or equipment including the element.
Each embodiment in this specification is all made of relevant mode and describes, same and similar portion between each embodiment Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for device, For the embodiment of electronic equipment and storage medium, since it is substantially similar to the method embodiment, so be described relatively simple, The relevent part can refer to the partial explaination of embodiments of method.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the scope of the present invention.It is all Any modification, equivalent replacement, improvement and so within the spirit and principles in the present invention, are all contained in protection scope of the present invention It is interior.

Claims (26)

1. a kind of image analysis method, which is characterized in that the described method includes:
Obtain image to be detected;
By preset algorithm of target detection, described image to be detected is detected, obtains multiple object detection results;
The multiple object detection results are merged according to default merging rule, target is obtained and merges testing result.
2. the method according to claim 1, wherein described examine the multiple target according to default merging rule Survey result merge, obtain target merge testing result the step of include:
According to default rule of classification, the multiple object detection results are grouped, obtain multiple testing result groupings;
According to rule is merged in preset group, the object detection results for including in each testing result grouping are merged, It obtains merging testing result in group;
According to rule is merged between preset group, between each testing result grouping, will merge in each object detection results and group Testing result merges, and obtains merging testing result between group;
Testing result will be merged between each described group, merges testing result as target.
3. according to the method described in claim 2, it is characterized in that, described according to default rule of classification, by the multiple target Testing result is grouped, and is obtained the step of multiple testing results are grouped and is included:
In the multiple object detection results, human detection result, head and shoulder testing result, number of people testing result and face are examined It surveys result and is referred to human body group, the car plate detection result of the vehicle detection result of first kind vehicle and the first kind vehicle is returned Class is referred to the second vehicle group to the first vehicle group, by the vehicle detection result of the second class vehicle, by the vehicle detection of third class vehicle As a result it is referred to third vehicle group, wherein the first kind vehicle is the vehicle that wheel count is no less than 4, the second class vehicle The vehicle for being 2 for wheel count, the third class vehicle are the vehicle that wheel number is 3.
4., will be each described according to the method described in claim 2, it is characterized in that, described according to rule is merged in preset group Testing result is grouped the object detection results for including and merges, and includes: a step of obtaining merging testing result in group
According to positional relationship, the object detection results that each testing result grouping includes are merged, obtain each group Group interior main body testing result and group inner assembly testing result after interior target merging, as merging testing result in group.
5. according to the method described in claim 4, it is characterized in that, the multiple object detection results include human testing knot Fruit, head and shoulder testing result, number of people testing result and Face datection are as a result, testing result grouping includes human body group;
It is described that each testing result is grouped the object detection results for including and is merged according to positional relationship, it obtains every Group interior main body testing result and group inner assembly testing result after target merges in a group, as the step for merging testing result in group Suddenly include:
In the human body group, according to goal-selling frame method of adjustment, human body frame in each human detection result is adjusted The size of number of people frame in height and the number of people testing result;
According to height human body frame adjusted, the head and shoulder frame of the head and shoulder testing result, size number of people frame adjusted and described The positional relationship of the face frame of Face datection result determines the object detection results for belonging to same target subject;
For each target subject, chooses and define highest-ranking object detection results, the group as the target subject Interior main body testing result, by other object detection results in addition to the subject detection result of the target subject, as institute State the group inner assembly testing result of target subject, wherein described to define the sequence of rank from high to low successively are as follows: human testing knot Fruit, head and shoulder testing result, number of people testing result and Face datection result;
The group interior main body testing result of each target subject and group inner assembly testing result are merged respectively, obtain institute It states and merges testing result in the group of human body group.
6. according to the method described in claim 5, it is characterized in that, the multiple object detection results further include first kind vehicle Vehicle detection result and the first kind vehicle car plate detection as a result, the testing result grouping further include the first vehicle group, Wherein, the first kind vehicle is the vehicle that wheel count is no less than 4;
It is described that each testing result is grouped the object detection results for including and is merged according to positional relationship, it obtains every Group interior main body testing result and group inner assembly testing result after target merges in a group, as the step for merging testing result in group Suddenly include:
In first Che Zuzhong, the vehicle frame and each license plate for detecting the vehicle detection result of each first kind vehicle are examined Survey the positional relationship of the license plate frame of result;
If in the vehicle frame including the license plate frame, using the corresponding vehicle detection result of the vehicle frame as group interior main body inspection It surveys as a result, the corresponding car plate detection result of the license plate frame for including using the vehicle frame is as group inner assembly testing result;
If not including the license plate frame in the vehicle frame, using the corresponding vehicle detection result of the vehicle frame as group interior main body Testing result, group inner assembly testing result are sky;
If the license plate frame is not included in the vehicle frame, using the corresponding car plate detection result of the license plate frame as main in group Physical examination is surveyed as a result, group inner assembly testing result is sky;
Each described group of interior main body testing result and corresponding group inner assembly testing result are merged respectively, obtain described first Merge testing result in the group of vehicle group.
7. according to the method described in claim 6, it is characterized in that, it is described according between preset group merge rule, in each inspection It surveys between result grouping, is merged testing result is merged in each object detection results and group, obtain merging detection knot between group The step of fruit includes:
According to positional relationship, between each testing result grouping, testing result will be merged in each object detection results and group It merges, obtains between the group after merging between each group between subject detection result and group component detection as a result, as inspection is merged between group Survey result.
8. the method according to the description of claim 7 is characterized in that described according to positional relationship, in each testing result It between grouping, merges, obtains main between the group after merging between each group by testing result is merged in each object detection results and group Component detection between body testing result and group as a result, as between group merge testing result before, the method also includes:
According to semantic relation, merging combination between group is determined, wherein merge in combination between same described group and detect including at least two As a result it is grouped;
It is described according to positional relationship, between each testing result grouping, detection will be merged in each object detection results and group As a result it merges, obtains between the group after merging between each group between subject detection result and group component detection as a result, closing as between group And testing result, comprising:
For combination is merged between each described group, according to positional relationship, each testing result that combination is merged between the group is grouped it Between, it is merged testing result is merged in each object detection results and group, obtains subject detection between the group after merging between each group As a result component detection is as a result, as testing result is merged between group and between group.
9. according to the method described in claim 8, it is characterized in that, the multiple object detection results further include the second class vehicle Vehicle detection result and third class vehicle vehicle detection as a result, the testing result grouping further include the second vehicle group and third Vehicle group, wherein the second class vehicle is the vehicle that wheel count is 2, and the third class vehicle is the vehicle that wheel number is 3;
It is described according to semantic relation, determine that the step of merging combination between group includes:
Merge to merge between combination, second group according to semantic relation, between determining first group and merge combination between combination and third group, In, it includes the human body group and the first vehicle group that combination is merged between described first group, and merging combination between described second group includes The human body group and the second vehicle group, it includes the human body group and the third vehicle group that combination is merged between the third group.
10. according to the method described in claim 9, it is characterized in that, described combine for merging between each described group, according to position Relationship is set, is merged between the testing result grouping of combination between the group, testing result will be merged in each object detection results and group It merges, obtains between the group after merging between each group between subject detection result and group component detection as a result, as inspection is merged between group Survey result the step of include:
For combination is merged between described second group, detect the cart frame of the vehicle detection result of the second class vehicle with it is described The positional relationship of the body frame of interior main body testing result is organized in human body group;
If including the body frame in the cart frame, by the vehicle detection knot of the corresponding second class vehicle of the cart frame Fruit is as subject detection between group as a result, in corresponding group of interior main body testing result of body frame and group for including by the cart frame Component detection result is as component detection result between group;
If not including the body frame in the cart frame, by the vehicle detection of the corresponding second class vehicle of the cart frame As a result as subject detection between group as a result, component detection result is sky between group;
If the body frame is not included in the cart frame, using corresponding group of interior main body testing result of the body frame as Subject detection between group is as a result, using corresponding group of inner assembly testing result of the body frame as component detection result between group;
Respectively by component detection result merges between subject detection result and corresponding group between each described group, described second is obtained Merge testing result between the group of vehicle group.
11. according to the method described in claim 9, it is characterized in that, described combine for merging between each described group, according to position Relationship is set, is merged between the testing result grouping of combination between the group, testing result will be merged in each object detection results and group It merges, obtains between the group after merging between each group between subject detection result and group component detection as a result, as inspection is merged between group Survey result the step of include:
For combination is merged between the third group, detect the tricycle frame of the vehicle detection result of the third class vehicle with it is described The positional relationship of the body frame of interior main body testing result is organized in human body group;
If including the body frame in the tricycle frame, by the vehicle detection knot of the corresponding third class vehicle of the tricycle frame Fruit is as subject detection between group as a result, merging testing result in corresponding group of the body frame for including using the tricycle frame as group Between component detection result;
If not including the body frame in the tricycle frame, by the vehicle detection of the corresponding third class vehicle of the tricycle frame As a result as subject detection between group as a result, component detection result is sky between group;
If the body frame is not included in the tricycle frame, using corresponding group of interior main body testing result of the body frame as Subject detection between group is as a result, using corresponding group of inner assembly testing result of the body frame as component detection result between group;
Respectively by component detection result merges between subject detection result and corresponding group between each described group, the third is obtained Merge testing result between the group of vehicle group.
12. according to the method described in claim 9, it is characterized in that, described combine for merging between each described group, according to position Relationship is set, is merged between the testing result grouping of combination between the group, testing result will be merged in each object detection results and group It merges, obtains between the group after merging between each group between subject detection result and group component detection as a result, as inspection is merged between group Survey result the step of include:
For combination is merged between described first group, detect organized in the first vehicle group the body frame of interior main body testing result with it is described The positional relationship of the body frame of interior main body testing result is organized in human body group;
If being organized in the first vehicle group in the body frame of interior main body testing result comprising group interior main body detection knot in the human body group The body frame of fruit, using the group interior main body testing result of the first vehicle group as subject detection between group as a result, by first vehicle Merge testing result as component detection result between group in the group inner assembly testing result of group and the group of the human body group;
Group interior main body detection in the human body group is not included in the body frame of interior main body testing result if organizing in the first vehicle group As a result body frame, using the group interior main body testing result of the first vehicle group as subject detection between group as a result, by described first The group inner assembly testing result of vehicle group is as component detection result between group;
If the body frame for organizing interior main body testing result in the human body group, which is not included in the first vehicle group, organizes interior main body It, as a result, will be described using the group interior main body testing result of the human body group as subject detection between group in the body frame of testing result The group inner assembly testing result of human body group is as component detection result between group;
Respectively by component detection result merges between subject detection result and corresponding group between each described group, described first is obtained Merge testing result between the group of vehicle group.
13. a kind of image analysis apparatus, which is characterized in that described device includes:
Image collection module, for obtaining image to be detected;
Module of target detection, for detecting, obtaining multiple to described image to be detected by preset algorithm of target detection Object detection results;
As a result merging module obtains target for merging according to default merging rule to the multiple object detection results Merge testing result.
14. device according to claim 13, which is characterized in that the result merging module includes:
As a result it is grouped submodule, for the multiple object detection results being grouped, are obtained more according to default rule of classification A testing result grouping;
Merge submodule in group, for according to merging rule in preset group, the mesh that will include in each testing result grouping Mark testing result merges, and obtains merging testing result in group;
Merge submodule between group, for regular according to merging between preset group, between each testing result grouping, by each target Merge testing result in testing result and group to merge, obtains merging testing result between group;
As a result it determines submodule, for testing result will to be merged between each described group, merges testing result as target.
15. device according to claim 14, which is characterized in that the result is grouped submodule, is specifically used for:
In the multiple object detection results, human detection result, head and shoulder testing result, number of people testing result and face are examined It surveys result and is referred to human body group, the car plate detection result of the vehicle detection result of first kind vehicle and the first kind vehicle is returned Class is referred to the second vehicle group to the first vehicle group, by the vehicle detection result of the second class vehicle, by the vehicle detection of third class vehicle As a result it is referred to third vehicle group, wherein the first kind vehicle is the vehicle that wheel count is no less than 4, the second class vehicle The vehicle for being 2 for wheel count, the third class vehicle are the vehicle that wheel number is 3.
16. device according to claim 14, which is characterized in that merge submodule in described group, be specifically used for:
According to positional relationship, the object detection results that each testing result grouping includes are merged, obtain each group Group interior main body testing result and group inner assembly testing result after interior target merging, as merging testing result in group.
17. device according to claim 16, which is characterized in that the multiple object detection results include human testing knot Fruit, head and shoulder testing result, number of people testing result and Face datection are as a result, testing result grouping includes human body group;
Merging submodule in described group includes:
Detection block adjustment unit, for according to goal-selling frame method of adjustment, adjusting each human body in the human body group In testing result in the height of human body frame and the number of people testing result number of people frame size;
Human body group position comparing unit, for the head and shoulder frame, big according to height human body frame adjusted, the head and shoulder testing result The positional relationship of small number of people frame adjusted and the face frame of the Face datection result, determines to belong to same target subject Object detection results;
Human body group main body determination unit is chosen for being directed to each target subject and defines highest-ranking target detection knot Fruit, as the group interior main body testing result of the target subject, by the target subject in addition to the subject detection result Other object detection results, the group inner assembly testing result as the target subject, wherein the definition rank is from high to low Sequence successively are as follows: human detection result, head and shoulder testing result, number of people testing result and Face datection result;
Combining unit in human body group group, for respectively by the group interior main body testing result of each target subject and group inner assembly Testing result merges, and obtains merging testing result in the group of the human body group.
18. device according to claim 17, which is characterized in that the multiple object detection results further include first kind vehicle Vehicle detection result and the first kind vehicle car plate detection as a result, the testing result grouping further include the first vehicle Group, wherein the first kind vehicle is the vehicle that wheel count is no less than 4;
Merging submodule in described group includes:
First vehicle group position comparing unit, for detecting the vehicle frame of each vehicle detection result in first Che Zuzhong With the positional relationship of the license plate frame of each car plate detection result;
First main body determination unit, if for including the license plate frame in the vehicle frame, by the corresponding vehicle of the vehicle frame Testing result is as group interior main body testing result, and the corresponding car plate detection result of the license plate frame for including using the vehicle frame is as group Inner assembly testing result;
Second main body determination unit, if for not including the license plate frame in the vehicle frame, by the corresponding vehicle of the vehicle frame Testing result is sky as a group interior main body testing result, group inner assembly testing result;
Third main body determination unit, it is if being not included in the vehicle frame for the license plate frame, the license plate frame is corresponding Car plate detection result is sky as group interior main body testing result, group inner assembly testing result;
Combining unit in first vehicle group group, for respectively by each described group of interior main body testing result and corresponding group inner assembly detection As a result it merges, obtains merging testing result in the group of the first vehicle group.
19. device according to claim 18, which is characterized in that merge submodule between described group, be specifically used for:
According to positional relationship, between each testing result grouping, testing result will be merged in each object detection results and group It merges, obtains between the group after merging between each group between subject detection result and group component detection as a result, as inspection is merged between group Survey result.
20. device according to claim 19, which is characterized in that described device further include:
Determining module is combined, for determining merging combination between group, wherein merge combination between same described group according to semantic relation In include at least the grouping of two testing results;
Merge submodule between described group, is specifically used for for merging combination between each described group, according to positional relationship, between the group Merge between each testing result grouping of combination, merges, obtain by testing result is merged in each object detection results and group Between each group merge after group between subject detection result and group component detection as a result, as testing result is merged between group.
21. device according to claim 20, which is characterized in that the multiple object detection results further include the second class vehicle Vehicle detection result and third class vehicle vehicle detection as a result, testing result grouping further includes the second vehicle group and the Three vehicle groups, wherein the second class vehicle is the vehicle that wheel count is 2, and the third class vehicle is the vehicle that wheel number is 3 ?;
The combination determining module, is specifically used for:
Merge to merge between combination, second group according to semantic relation, between determining first group and merge combination between combination and third group, In, it includes the human body group and the first vehicle group that combination is merged between described first group, and merging combination between described second group includes The human body group and the second vehicle group, it includes the human body group and the third vehicle group that combination is merged between the third group.
22. according to the method for claim 21, which is characterized in that merge submodule between described group, comprising:
Cart position comparing unit, for detecting the vehicle of the second class vehicle for combination is merged between described second group The positional relationship of the body frame of interior main body testing result is organized in the cart frame of testing result and the human body group;
The first determination unit of cart, if for including the body frame in the cart frame, the cart frame is corresponding The second class vehicle vehicle detection result as subject detection between group as a result, the body frame for including by the cart frame is corresponding Group interior main body testing result and group inner assembly testing result as component detection result between group;
The second determination unit of cart, if for not including the body frame in the cart frame, by the cart frame pair The vehicle detection result for the second class vehicle answered is as subject detection between group as a result, component detection result is sky between group;
Cart third determination unit is not included in the cart frame for the body frame, and the body frame is corresponding Group interior main body testing result as subject detection between group as a result, using corresponding group of inner assembly testing result of the body frame as Component detection result between group;
Combining unit between second vehicle group, for respectively by component detection knot between subject detection result and corresponding group between each described group Fruit merges, and obtains merging testing result between the group of the second vehicle group.
23. according to the method for claim 21, which is characterized in that merge submodule between described group, comprising:
Three-wheel truck position comparing unit, for detecting the vehicle of the third class vehicle for combination is merged between the third group The positional relationship of the body frame of interior main body testing result is organized in the tricycle frame of testing result and the human body group;
The first determination unit of tricycle, if for including the body frame in the tricycle frame, the tricycle frame is corresponding Third class vehicle vehicle detection result as subject detection between group as a result, the body frame for including by the tricycle frame is corresponding Group in merge testing result as component detection result between group;
The second determination unit of tricycle, if for not including the body frame in the tricycle frame, by the tricycle frame pair The vehicle detection result for the third class vehicle answered is as subject detection between group as a result, component detection result is sky between group;
Tricycle third determination unit, if being not included in the tricycle frame for the body frame, by the body frame pair The group interior main body testing result answered is as subject detection between group as a result, corresponding group of inner assembly testing result of the body frame is made The component detection result between group;
Combining unit between third vehicle group, for respectively by component detection knot between subject detection result and corresponding group between each described group Fruit merges, and obtains merging testing result between the group of the third vehicle group.
24. according to the method for claim 21, which is characterized in that merge submodule between described group, comprising:
A kind of vehicle location comparing unit, for detecting in the first vehicle group in group for combination is merged between described first group The positional relationship of the body frame of interior main body testing result is organized in the body frame of subject detection result and the human body group;
A kind of the first determination unit of vehicle, if for including institute in the body frame of group interior main body testing result in the first vehicle group The body frame that interior main body testing result is organized in human body group is stated, using the group interior main body testing result of the first vehicle group as main between group Physical examination survey as a result, will the first vehicle group group inner assembly testing result and the human body group group in merge testing result as Component detection result between group;
A kind of the second determination unit of vehicle, if for not including in the body frame of group interior main body testing result in the first vehicle group The body frame that interior main body testing result is organized in the human body group, using the group interior main body testing result of the first vehicle group as between group Subject detection is as a result, using the group inner assembly testing result of the first vehicle group as component detection result between group;
A kind of vehicle third determination unit, if the body frame for organizing interior main body testing result in the human body group does not include In the body frame for organizing interior main body testing result in the first vehicle group, by the group interior main body testing result of the human body group As subject detection between group as a result, using the group inner assembly testing result of the human body group as component detection result between group;
Combining unit between first vehicle group, for respectively by component detection knot between subject detection result and corresponding group between each described group Fruit merges, and obtains merging testing result between the group of the first vehicle group.
25. a kind of electronic equipment, which is characterized in that including processor and memory,
The memory, for storing computer program;
The processor when for executing the program stored on the memory, realizes that claim 1-12 is any described Method and step.
26. a kind of computer readable storage medium, which is characterized in that be stored with computer in the computer readable storage medium Program realizes claim 1-12 any method and step when the computer program is executed by processor.
CN201810096195.2A 2018-01-31 2018-01-31 Image analysis method, device, electronic equipment and storage medium Pending CN110096935A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810096195.2A CN110096935A (en) 2018-01-31 2018-01-31 Image analysis method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810096195.2A CN110096935A (en) 2018-01-31 2018-01-31 Image analysis method, device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN110096935A true CN110096935A (en) 2019-08-06

Family

ID=67442039

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810096195.2A Pending CN110096935A (en) 2018-01-31 2018-01-31 Image analysis method, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110096935A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110427905A (en) * 2019-08-08 2019-11-08 北京百度网讯科技有限公司 Pedestrian tracting method, device and terminal
CN113223046A (en) * 2020-07-10 2021-08-06 浙江大华技术股份有限公司 Method and system for identifying prisoner behaviors
CN113435429A (en) * 2021-08-27 2021-09-24 广东电网有限责任公司中山供电局 Multi-target detection and tracking system based on field operation monitoring video
US11538175B2 (en) 2019-09-29 2022-12-27 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Method and apparatus for detecting subject, electronic device, and computer readable storage medium
US11836903B2 (en) 2019-10-16 2023-12-05 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Subject recognition method, electronic device, and computer readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102750532A (en) * 2012-06-06 2012-10-24 西安电子科技大学 Method for detecting targets based on components
CN102914267A (en) * 2012-09-27 2013-02-06 无锡天授信息科技有限公司 System and method for detecting size of moving object
CN104361327A (en) * 2014-11-20 2015-02-18 苏州科达科技股份有限公司 Pedestrian detection method and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102750532A (en) * 2012-06-06 2012-10-24 西安电子科技大学 Method for detecting targets based on components
CN102914267A (en) * 2012-09-27 2013-02-06 无锡天授信息科技有限公司 System and method for detecting size of moving object
CN104361327A (en) * 2014-11-20 2015-02-18 苏州科达科技股份有限公司 Pedestrian detection method and system

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110427905A (en) * 2019-08-08 2019-11-08 北京百度网讯科技有限公司 Pedestrian tracting method, device and terminal
US11538175B2 (en) 2019-09-29 2022-12-27 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Method and apparatus for detecting subject, electronic device, and computer readable storage medium
US11836903B2 (en) 2019-10-16 2023-12-05 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Subject recognition method, electronic device, and computer readable storage medium
CN113223046A (en) * 2020-07-10 2021-08-06 浙江大华技术股份有限公司 Method and system for identifying prisoner behaviors
CN113223046B (en) * 2020-07-10 2022-10-14 浙江大华技术股份有限公司 Method and system for identifying prisoner behaviors
CN113435429A (en) * 2021-08-27 2021-09-24 广东电网有限责任公司中山供电局 Multi-target detection and tracking system based on field operation monitoring video

Similar Documents

Publication Publication Date Title
CN110096935A (en) Image analysis method, device, electronic equipment and storage medium
Idrees et al. Composition loss for counting, density map estimation and localization in dense crowds
CN111401177B (en) End-to-end behavior recognition method and system based on adaptive space-time attention mechanism
CN109447169A (en) The training method of image processing method and its model, device and electronic system
CN108831161A (en) A kind of traffic flow monitoring method, intelligence system and data set based on unmanned plane
CN107871134A (en) A kind of method for detecting human face and device
CN110879982B (en) Crowd counting system and method
CN105590099B (en) A kind of more people's Activity recognition methods based on improvement convolutional neural networks
CN109508583B (en) Method and device for acquiring crowd distribution characteristics
CN106250838A (en) vehicle identification method and system
CN109711322A (en) A kind of people's vehicle separation method based on RFCN
CN101073078A (en) Multi-tiered image clustering by event
CN109447186A (en) Clustering method and Related product
CN108664849A (en) The detection device of event, method and image processing equipment in video
CN107578021A (en) Pedestrian detection method, apparatus and system based on deep learning network
CN110533053A (en) A kind of event detecting method, device and electronic equipment
CN110110627A (en) A method of the real-time target detection towards computing resource limitation Platform deployment
KR20190050639A (en) Apparatus and Method for classifing Gesture based on CNN
CN114821102A (en) Intensive citrus quantity detection method, equipment, storage medium and device
CN111553321A (en) Mobile vendor target detection model, detection method and management method thereof
CN112561801A (en) Target detection model training method based on SE-FPN, target detection method and device
CN101794437A (en) Method for detecting abnormal target in hyperspectral remotely sensed image
CN101651824A (en) Mobile object monitoring device
CN109871762A (en) A kind of evaluation method and device of human face recognition model
CN114169425B (en) Training target tracking model and target tracking method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20190806

RJ01 Rejection of invention patent application after publication