CN112950961A - Traffic flow statistical method, device, equipment and storage medium - Google Patents

Traffic flow statistical method, device, equipment and storage medium Download PDF

Info

Publication number
CN112950961A
CN112950961A CN202110112391.6A CN202110112391A CN112950961A CN 112950961 A CN112950961 A CN 112950961A CN 202110112391 A CN202110112391 A CN 202110112391A CN 112950961 A CN112950961 A CN 112950961A
Authority
CN
China
Prior art keywords
vehicle
video frame
feature vector
statistical
vehicles
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.)
Granted
Application number
CN202110112391.6A
Other languages
Chinese (zh)
Other versions
CN112950961B (en
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.)
Suzhou Zhixin Konglian Information Technology Co ltd
Original Assignee
Suzhou Zhixin Konglian Information 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 Suzhou Zhixin Konglian Information Technology Co ltd filed Critical Suzhou Zhixin Konglian Information Technology Co ltd
Priority to CN202110112391.6A priority Critical patent/CN112950961B/en
Publication of CN112950961A publication Critical patent/CN112950961A/en
Application granted granted Critical
Publication of CN112950961B publication Critical patent/CN112950961B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G08SIGNALLING
    • G08GTRAFFIC CONTROL SYSTEMS
    • G08G1/00Traffic control systems for road vehicles
    • G08G1/065Traffic control systems for road vehicles by counting the vehicles in a section of the road or in a parking area, i.e. comparing incoming count with outgoing count
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/40Scenes; Scene-specific elements in video content
    • G06V20/41Higher-level, semantic clustering, classification or understanding of video scenes, e.g. detection, labelling or Markovian modelling of sport events or news items
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/40Scenes; Scene-specific elements in video content
    • G06V20/46Extracting features or characteristics from the video content, e.g. video fingerprints, representative shots or key frames
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/40Scenes; Scene-specific elements in video content
    • G06V20/48Matching video sequences

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Data Mining & Analysis (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Software Systems (AREA)
  • Computational Linguistics (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • Computing Systems (AREA)
  • Molecular Biology (AREA)
  • General Health & Medical Sciences (AREA)
  • Mathematical Physics (AREA)
  • Biophysics (AREA)
  • Biomedical Technology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Health & Medical Sciences (AREA)
  • Traffic Control Systems (AREA)

Abstract

The invention is suitable for the technical field of intelligent traffic and provides a traffic flow statistical method, a device, equipment and a storage medium, wherein the traffic flow statistical method comprises the following steps: receiving a first video frame collected in real time; acquiring a feature vector of each non-statistical vehicle in a first video frame; determining the first target vehicle as a counted vehicle under the condition that vehicles with characteristic vectors matched with the characteristic vectors of the first target vehicle exist in a preset number of second video frames; the preset number of second video frames is video frames continuously collected before the first video frame, and the first target vehicle is any one vehicle in each non-statistical vehicle in the first video frame. The invention can improve the accuracy of the traffic flow statistics.

Description

Traffic flow statistical method, device, equipment and storage medium
Technical Field
The invention belongs to the technical field of intelligent traffic, and particularly relates to a traffic flow statistical method, a device, equipment and a storage medium.
Background
The traffic flow statistics is the basic work of road traffic planning construction and operation, and the traffic flow can provide a large amount of effective information for traffic managers, so that the traffic intelligentization level and the urban traffic service efficiency are greatly improved.
With the development of deep learning, the existing traffic flow statistical method is generally based on a statistical method of target tracking, namely: the method comprises the steps of firstly detecting the position of a certain vehicle in a certain video frame by using a target detection technology, and then carrying out traffic flow statistics by combining a target tracking algorithm according to the position overlapping degree of the vehicle in the video frames before and after the video frame.
However, when the vehicles are dense or the vehicles run too fast, the above statistical method based on target tracking is prone to vehicle tracking failure, resulting in low accuracy of traffic flow statistics.
Disclosure of Invention
In view of this, embodiments of the present invention provide a traffic flow statistics method, apparatus, device, and storage medium, so as to solve the problem in the prior art that when a vehicle is dense or the vehicle is traveling too fast, the accuracy of traffic flow statistics is low.
A first aspect of an embodiment of the present invention provides a traffic flow statistical method, including:
receiving a first video frame collected in real time;
acquiring a feature vector of each non-statistical vehicle in a first video frame;
determining the first target vehicle as a counted vehicle under the condition that vehicles with characteristic vectors matched with the characteristic vectors of the first target vehicle exist in a preset number of second video frames; the preset number of second video frames is video frames continuously collected before the first video frame, and the first target vehicle is any one vehicle in each non-statistical vehicle in the first video frame.
Optionally, after the first target vehicle is determined as the counted vehicle, the traffic flow counting method further includes:
the feature vector of the first target vehicle is stored.
Optionally, before obtaining the feature vector of each non-statistical vehicle in the first video frame, the traffic flow statistical method further includes:
determining the coordinate position of each vehicle in the first video frame according to a preset detection algorithm;
extracting an image of a corresponding vehicle according to the coordinate position of each vehicle;
inputting the image of each vehicle into a preset feature extraction model to obtain a feature vector of the corresponding vehicle;
and determining the non-statistical vehicles in the first video frame according to the feature vector of each vehicle and the feature vectors of the pre-stored statistical vehicles.
Optionally, determining an unpasteurized vehicle in the first video frame according to a prestored feature vector of a counted vehicle, including:
determining the second target vehicle as an unpasteurized vehicle under the condition that the feature vector with the similarity larger than a preset threshold value with the feature vector of the second target vehicle does not exist in the feature vectors of the pre-stored counted vehicles; the second target vehicle is any one vehicle in each vehicle in the first video frame;
and the difference value between the pre-stored storage moment of the characteristic vector of the counted vehicle and the acquisition moment of the first video frame is smaller than a preset difference value.
Optionally, the vehicle whose feature vector is matched with the feature vector of the first target vehicle is a vehicle whose similarity between the feature vector and the feature vector of the first target vehicle is greater than a preset threshold.
A second aspect of an embodiment of the present invention provides a traffic flow statistic device, including:
the receiving module is used for receiving a first video frame acquired in real time;
the acquisition module is used for acquiring the feature vector of each non-statistical vehicle in the first video frame;
the counting module is used for determining the first target vehicle as a counted vehicle under the condition that vehicles with characteristic vectors matched with the characteristic vectors of the first target vehicle exist in a preset number of second video frames; the preset number of second video frames is video frames continuously collected before the first video frame, and the first target vehicle is any one vehicle in each non-statistical vehicle in the first video frame.
Optionally, the traffic flow statistic device further includes a storage module, configured to:
the feature vector of the first target vehicle is stored.
Optionally, the traffic flow statistic device further includes a determining module, configured to:
determining the coordinate position of each vehicle in the first video frame according to a preset detection algorithm;
extracting an image of a corresponding vehicle according to the coordinate position of each vehicle;
inputting the image of each vehicle into a preset feature extraction model to obtain a feature vector of the corresponding vehicle;
and determining the non-statistical vehicles in the first video frame according to the feature vector of each vehicle and the feature vectors of the pre-stored statistical vehicles.
Optionally, the determining module is further configured to:
determining the second target vehicle as an unpasteurized vehicle under the condition that the feature vector with the similarity larger than a preset threshold value with the feature vector of the second target vehicle does not exist in the feature vectors of the pre-stored counted vehicles; the second target vehicle is any one vehicle in each vehicle in the first video frame;
and the difference value between the pre-stored storage moment of the characteristic vector of the counted vehicle and the acquisition moment of the first video frame is smaller than a preset difference value.
Optionally, the vehicle whose feature vector is matched with the feature vector of the first target vehicle is a vehicle whose similarity between the feature vector and the feature vector of the first target vehicle is greater than a preset threshold.
A third aspect of embodiments of the present invention provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the method according to the first aspect when executing the computer program.
A fourth aspect of embodiments of the present invention provides a computer-readable storage medium storing a computer program which, when executed by a processor, performs the steps of the method according to the first aspect.
Compared with the prior art, the embodiment of the invention has the following beneficial effects:
according to the embodiment of the invention, after the first video frame collected in real time is received, the feature vector of the first target vehicle in the first video frame can be obtained, and then the first target vehicle can be determined as the counted vehicle under the condition that vehicles with feature vectors matched with the feature vector of the first target vehicle exist in the preset number of second video frames. The preset number of second video frames is video frames continuously collected before the first video frame, and the first target vehicle is any one of the vehicles which are not counted in the first video frame, so that the traffic flow statistics can be performed on each vehicle which is not counted in the first video frame according to the traffic flow statistics process of the first target vehicle, and the traffic flow statistics of each vehicle which is not counted in the first video frame can be completed. In addition, when the vehicles are dense or the vehicles run too fast, the feature vectors of different vehicles can still be acquired, so that the condition of vehicle tracking failure can not occur even when the vehicles are dense or the vehicles run too fast by adopting a feature vector matching mode, and the accuracy of traffic flow statistics is higher.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a flowchart illustrating steps of a traffic flow statistical method according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating steps of a traffic flow statistical method according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a traffic flow statistic device according to an embodiment of the present invention;
fig. 4 is a schematic diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.
In order to explain the technical means of the present invention, the following description will be given by way of specific examples.
As described in the background art, when the vehicles are dense or the vehicles are traveling too fast, the above statistical method based on target tracking is prone to vehicle tracking failure, resulting in low accuracy of traffic flow statistics. This is because, when the vehicles are dense, different vehicles may overlap each other in the front and rear video frames, and vehicle tracking according to the position overlapping degree cannot be performed, and thus, a vehicle tracking failure occurs. When the vehicle is driving too fast, if the video frame rate is low, position overlapping may not occur in the front and rear video frames, which also results in a situation where vehicle tracking cannot be performed according to the position overlapping degree.
In order to solve the problems in the prior art, embodiments of the present invention provide a traffic flow statistical method, apparatus, device, and storage medium. The following first introduces a traffic flow statistical method provided by an embodiment of the present invention.
The main body of the traffic flow statistical method may be a traffic flow statistical device, and the traffic flow statistical device may be an electronic device with data processing capability, such as a server, a Network Attached Storage (NAS), or a Personal Computer (PC), and the embodiments of the present invention are not limited in particular.
As shown in fig. 1, the traffic flow statistical method provided in the embodiment of the present invention may include the following steps:
step S110, receiving a first video frame collected in real time.
In some embodiments, a camera device installed above the road may record videos of vehicles on the road, such as buses, cars, trucks, engineering vehicles, etc., in real time, and send the recorded videos to the traffic flow rate statistic device in the form of video frames in real time. Thus, the traffic flow statistic device can receive the first video frame collected in real time.
And step S120, acquiring a feature vector of each non-statistical vehicle in the first video frame.
In some embodiments, the non-counted vehicle refers to a vehicle that is not counted in the traffic flow, and correspondingly, the counted vehicle refers to a vehicle that is counted in the traffic flow.
After receiving the first video frame, the traffic flow statistics apparatus may determine all the non-statistical vehicles in the first video frame, and then obtain the feature vectors of the non-statistical vehicles.
Optionally, the non-statistical vehicle in the first video frame may be determined according to the feature vector of the counted vehicle, as shown in fig. 2, and the corresponding processing may be as follows:
and step S210, determining the coordinate position of each vehicle in the first video frame according to a preset detection algorithm.
In some embodiments, the predetermined detection algorithm may be any target detection algorithm, such as a Kernel Correlation Filter (KCF).
And S220, extracting an image of the corresponding vehicle according to the coordinate position of each vehicle.
In some embodiments, after the coordinate position of each vehicle in the first video frame is determined, an image of each vehicle may be extracted from the first video frame. Specifically, the image of each vehicle may include only the video frame region in which the vehicle is located, and include as few non-vehicle video frame regions as possible.
And step S230, inputting the image of each vehicle into a preset feature extraction model to obtain the feature vector of the corresponding vehicle.
In some implementations, the preset feature extraction model may be a Convolutional Neural Network (CNN) model, such as a model that outputs 64, 128, or higher dimensions.
Step S240, determining the non-statistical vehicles in the first video frame according to the feature vector of each vehicle and the feature vectors of the statistical vehicles stored in advance.
In some embodiments, after obtaining the feature vector of each vehicle, the feature vector of each vehicle may be compared with the feature vectors of the previously stored counted vehicles to determine the non-counted vehicles in the first video frame.
Optionally, the specific processing in step S240 may be as follows: and determining the second target vehicle as the non-statistical vehicle under the condition that the feature vector with the similarity larger than a preset threshold value with the feature vector of the second target vehicle does not exist in the feature vectors of the pre-stored statistical vehicles.
In some embodiments, the second target vehicle refers to any one of each of the vehicles in the first video frame.
In some embodiments, two vehicles may be judged to be similar or identical by the similarity between the feature vectors. Specifically, if the similarity between two feature vectors is greater than a preset threshold, for example, 0.9, the vehicles corresponding to the two feature vectors may be considered similar or identical. Since vehicles passing through the road collection area at a certain moment are usually dissimilar vehicles, whether a vehicle belongs to a counted vehicle or an unpasteurized vehicle can be judged by comparing the similarity with the feature vectors of the counted vehicles stored in advance.
It should be noted that, for the previously counted vehicles, after the traffic flow is counted for any vehicle, the feature vector of the vehicle may be stored, so that when it is determined that no vehicle is counted, the feature vector of the counted vehicle stored in advance may be quickly acquired from the storage area.
Specifically, if there is no feature vector having a similarity greater than a preset threshold with the feature vector of the second target vehicle among the feature vectors of the counted vehicles stored in advance, the second target vehicle may be considered as an unpasteurized vehicle.
It is worth mentioning that, since vehicles of the same model, such as 2021 model 200TSI red popular tote, may pass through the road at different times, and the similarity of the feature vectors of the vehicles of the same model is usually greater than a preset threshold, the above-mentioned feature vectors of the pre-stored statistical vehicles may be defined as the feature vectors stored in a specific time period, for example, the feature vectors stored in the specific time period may satisfy the following condition: and the difference value between the storage moment of the feature vector of the pre-stored counted vehicle and the acquisition moment of the first video frame is smaller than a preset difference value.
And S130, under the condition that vehicles with characteristic vectors matched with the characteristic vectors of the first target vehicle exist in the preset number of second video frames, determining the first target vehicle as a counted vehicle.
In some embodiments, the preset number of second video frames may be video frames continuously captured before the first video frame, for example, three video frames continuously captured before the first video frame. The first target vehicle may be any one of each of the non-statistical vehicles in the first video frame. The vehicle with the feature vector matching the feature vector of the first target vehicle may be a vehicle with a similarity between the feature vector and the feature vector of the first target vehicle greater than a preset threshold.
It should be noted that the vehicles in the statistical traffic flow generally appear repeatedly in the continuously captured video frames, and the feature vectors of the vehicles in the video frames are matched with each other. Thus, the traffic flow statistics can be performed by the principle.
Specifically, after the feature vector of the first target vehicle in the first video frame is acquired, whether vehicles with feature vectors matched with the feature vector of the first target vehicle exist in a preset number of second video frames can be judged. If there are vehicles whose feature vectors match the feature vector of the first target vehicle in the preset number of second video frames, the first target vehicle may be determined as a counted vehicle, and thus the first target vehicle may be counted into the traffic flow. If there is no vehicle whose feature vector matches the feature vector of the first target vehicle in a preset number of second video frames, or there is only a vehicle whose feature vector matches the feature vector of the first target vehicle in an individual second video frame, it may be considered that the second target vehicle is not a counted vehicle and it is not necessary to count it in the traffic flow.
Optionally, after the first target vehicle is determined as the counted vehicle, the feature vector of the first target vehicle may be stored, and the storage time is recorded for counting subsequent traffic flow statistics.
In some embodiments, in order to quickly and accurately count the traffic flow, the traffic flow statistics can be performed by using an observation list and a tracking list. The observation list may record information of the non-counted vehicle, such as a feature vector of the vehicle, a storage time of the feature vector, and a vehicle type, and the tracking list may record information of the counted vehicle, such as a feature vector of the vehicle, a storage time of the feature vector, and a vehicle type. In addition, when an unpasteurized vehicle becomes a counted vehicle, the vehicle may be removed from the observation list and added to the tracking list. When a counted vehicle meets a removal condition, for example, the difference between the storage time of the feature vector and the acquisition time of the first video frame is smaller than a preset difference, the counted vehicle can be removed from the tracking list, so that the storage cost can be saved.
In the embodiment of the invention, after the first video frame collected in real time is received, the feature vector of the first target vehicle in the first video frame may be obtained first, and then the first target vehicle may be determined as the counted vehicle under the condition that vehicles with feature vectors matched with the feature vector of the first target vehicle exist in the preset number of second video frames. The preset number of second video frames is video frames continuously collected before the first video frame, and the first target vehicle is any one of the vehicles which are not counted in the first video frame, so that the traffic flow statistics can be performed on each vehicle which is not counted in the first video frame according to the traffic flow statistics process of the first target vehicle, and the traffic flow statistics of each vehicle which is not counted in the first video frame can be completed. In addition, when the vehicles are dense or the vehicles run too fast, the feature vectors of different vehicles can still be acquired, so that the condition of vehicle tracking failure can not occur even when the vehicles are dense or the vehicles run too fast by adopting a feature vector matching mode, and the accuracy of traffic flow statistics is higher.
Based on the traffic flow statistical method provided by the embodiment, correspondingly, the invention further provides a specific implementation mode of the traffic flow statistical device applied to the traffic flow statistical method. Please see the examples below.
As shown in fig. 3, there is provided a traffic flow statistic device, including:
a receiving module 310, configured to receive a first video frame acquired in real time;
the obtaining module 320 is configured to obtain a feature vector of each non-statistical vehicle in the first video frame;
the counting module 330 is configured to determine the first target vehicle as a counted vehicle when vehicles with feature vectors matching with the feature vector of the first target vehicle exist in a preset number of second video frames; the preset number of second video frames is video frames continuously collected before the first video frame, and the first target vehicle is any one vehicle in each non-statistical vehicle in the first video frame.
Optionally, the traffic flow statistic device further includes a storage module, configured to:
the feature vector of the first target vehicle is stored.
Optionally, the traffic flow statistic device further includes a determining module, configured to:
determining the coordinate position of each vehicle in the first video frame according to a preset detection algorithm;
extracting an image of a corresponding vehicle according to the coordinate position of each vehicle;
inputting the image of each vehicle into a preset feature extraction model to obtain a feature vector of the corresponding vehicle;
and determining the non-statistical vehicles in the first video frame according to the feature vector of each vehicle and the feature vectors of the pre-stored statistical vehicles.
Optionally, the determining module is further configured to:
determining the second target vehicle as an unpasteurized vehicle under the condition that the feature vector with the similarity larger than a preset threshold value with the feature vector of the second target vehicle does not exist in the feature vectors of the pre-stored counted vehicles; the second target vehicle is any one vehicle in each vehicle in the first video frame;
and the difference value between the pre-stored storage moment of the characteristic vector of the counted vehicle and the acquisition moment of the first video frame is smaller than a preset difference value.
Optionally, the vehicle whose feature vector is matched with the feature vector of the first target vehicle is a vehicle whose similarity between the feature vector and the feature vector of the first target vehicle is greater than a preset threshold.
In the embodiment of the invention, after the first video frame collected in real time is received, the feature vector of the first target vehicle in the first video frame may be obtained first, and then the first target vehicle may be determined as the counted vehicle under the condition that vehicles with feature vectors matched with the feature vector of the first target vehicle exist in the preset number of second video frames. The preset number of second video frames is video frames continuously collected before the first video frame, and the first target vehicle is any one of the vehicles which are not counted in the first video frame, so that the traffic flow statistics can be performed on each vehicle which is not counted in the first video frame according to the traffic flow statistics process of the first target vehicle, and the traffic flow statistics of each vehicle which is not counted in the first video frame can be completed. In addition, when the vehicles are dense or the vehicles run too fast, the feature vectors of different vehicles can still be acquired, so that the condition of vehicle tracking failure can not occur even when the vehicles are dense or the vehicles run too fast by adopting a feature vector matching mode, and the accuracy of traffic flow statistics is higher.
Fig. 4 is a schematic diagram of an electronic device according to an embodiment of the present invention. As shown in fig. 4, the electronic apparatus 4 of this embodiment includes: a processor 40, a memory 41 and a computer program 42 stored in said memory 41 and executable on said processor 40. The processor 40 implements the steps of the various embodiments of the traffic flow statistical method described above when executing the computer program 42. Alternatively, the processor 40 implements the functions of the modules/units in the above-described device embodiments when executing the computer program 42.
Illustratively, the computer program 42 may be partitioned into one or more modules/units that are stored in the memory 41 and executed by the processor 40 to implement the present invention. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution of the computer program 42 in the electronic device 4. For example, the computer program 42 may be divided into a receiving module, an obtaining module, and a counting module, and each module has the following specific functions:
the receiving module is used for receiving a first video frame acquired in real time;
the acquisition module is used for acquiring the feature vector of each non-statistical vehicle in the first video frame;
the counting module is used for determining the first target vehicle as a counted vehicle under the condition that vehicles with characteristic vectors matched with the characteristic vectors of the first target vehicle exist in a preset number of second video frames; the preset number of second video frames is video frames continuously collected before the first video frame, and the first target vehicle is any one vehicle in each non-statistical vehicle in the first video frame.
The electronic device 4 may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices. The electronic device may include, but is not limited to, a processor 40, a memory 41. Those skilled in the art will appreciate that fig. 4 is merely an example of an electronic device 4 and does not constitute a limitation of the electronic device 4 and may include more or fewer components than shown, or some components may be combined, or different components, e.g., the electronic device may also include input-output devices, network access devices, buses, etc.
The Processor 40 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 41 may be an internal storage unit of the electronic device 4, such as a hard disk or a memory of the electronic device 4. The memory 41 may also be an external storage device of the electronic device 4, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the electronic device 4. Further, the memory 41 may also include both an internal storage unit and an external storage device of the electronic device 4. The memory 41 is used for storing the computer program and other programs and data required by the electronic device. The memory 41 may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other ways. For example, the above-described embodiments of the apparatus/terminal device are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments may be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.

Claims (10)

1. A traffic flow statistical method, comprising:
receiving a first video frame collected in real time;
acquiring a feature vector of each non-statistical vehicle in the first video frame;
determining a first target vehicle as a counted vehicle under the condition that vehicles with characteristic vectors matched with the characteristic vectors of the first target vehicle exist in a preset number of second video frames; the preset number of second video frames is video frames continuously collected before the first video frame, and the first target vehicle is any one vehicle in each non-statistical vehicle in the first video frame.
2. The traffic flow statistical method according to claim 1, wherein after the determining of the first target vehicle as the counted vehicle, the method further comprises:
storing a feature vector of the first target vehicle.
3. The traffic flow statistical method according to claim 2, wherein before the obtaining the feature vector of each non-statistical vehicle in the first video frame, the method further comprises:
determining the coordinate position of each vehicle in the first video frame according to a preset detection algorithm;
extracting an image of a corresponding vehicle according to the coordinate position of each vehicle;
inputting the image of each vehicle into a preset feature extraction model to obtain a feature vector of the corresponding vehicle;
and determining the non-statistical vehicles in the first video frame according to the feature vector of each vehicle and the feature vectors of the pre-stored statistical vehicles.
4. The traffic flow statistical method according to claim 3, wherein the determining the non-statistical vehicles in the first video frame according to the pre-stored feature vectors of the statistical vehicles comprises:
determining a second target vehicle as an unpasteurized vehicle under the condition that the feature vector with the similarity larger than a preset threshold value with the feature vector of the second target vehicle does not exist in the feature vectors of the pre-stored counted vehicles; the second target vehicle is any one of the vehicles in the first video frame;
and the difference value between the pre-stored storage moment of the characteristic vector of the counted vehicle and the acquisition moment of the first video frame is smaller than a preset difference value.
5. The traffic flow statistical method according to claim 1, wherein the vehicle whose feature vector matches the feature vector of the first target vehicle is a vehicle whose similarity between the feature vector and the feature vector of the first target vehicle is greater than a preset threshold.
6. A traffic flow statistic device, comprising:
the receiving module is used for receiving a first video frame acquired in real time;
the acquisition module is used for acquiring the feature vector of each non-statistical vehicle in the first video frame;
the counting module is used for determining the first target vehicle as a counted vehicle under the condition that vehicles with characteristic vectors matched with the characteristic vectors of the first target vehicle exist in a preset number of second video frames; the preset number of second video frames is video frames continuously collected before the first video frame, and the first target vehicle is any one vehicle in each non-statistical vehicle in the first video frame.
7. The traffic flow statistic device according to claim 6, wherein said device further comprises a storage module for:
storing a feature vector of the first target vehicle.
8. The traffic flow statistic device according to claim 7, wherein said device further comprises a determination module for:
determining the coordinate position of each vehicle in the first video frame according to a preset detection algorithm;
extracting an image of a corresponding vehicle according to the coordinate position of each vehicle;
inputting the image of each vehicle into a preset feature extraction model to obtain a feature vector of the corresponding vehicle;
and determining the non-statistical vehicles in the first video frame according to the feature vector of each vehicle and the feature vectors of the pre-stored statistical vehicles.
9. An electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the steps of the method according to any of claims 1 to 5 are implemented when the computer program is executed by the processor.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 5.
CN202110112391.6A 2021-01-27 2021-01-27 Traffic flow statistical method, device, equipment and storage medium Active CN112950961B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110112391.6A CN112950961B (en) 2021-01-27 2021-01-27 Traffic flow statistical method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110112391.6A CN112950961B (en) 2021-01-27 2021-01-27 Traffic flow statistical method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112950961A true CN112950961A (en) 2021-06-11
CN112950961B CN112950961B (en) 2022-07-08

Family

ID=76238001

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110112391.6A Active CN112950961B (en) 2021-01-27 2021-01-27 Traffic flow statistical method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112950961B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114092915A (en) * 2021-11-26 2022-02-25 阿波罗智联(北京)科技有限公司 Intersection traffic flow verification method, device, equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104809437A (en) * 2015-04-28 2015-07-29 无锡赛睿科技有限公司 Real-time video based vehicle detecting and tracking method
CN109377770A (en) * 2018-09-05 2019-02-22 华为技术有限公司 The method and apparatus of statistical vehicle flowrate calculate equipment and storage medium
CN109544907A (en) * 2018-10-23 2019-03-29 大唐软件技术股份有限公司 A kind of vehicle count method, device
CN109993081A (en) * 2019-03-20 2019-07-09 浙江农林大学暨阳学院 A kind of statistical method of traffic flow based on road video and car plate detection
CN110111565A (en) * 2019-04-18 2019-08-09 中国电子科技网络信息安全有限公司 A kind of people's vehicle flowrate System and method for flowed down based on real-time video

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104809437A (en) * 2015-04-28 2015-07-29 无锡赛睿科技有限公司 Real-time video based vehicle detecting and tracking method
CN109377770A (en) * 2018-09-05 2019-02-22 华为技术有限公司 The method and apparatus of statistical vehicle flowrate calculate equipment and storage medium
CN109544907A (en) * 2018-10-23 2019-03-29 大唐软件技术股份有限公司 A kind of vehicle count method, device
CN109993081A (en) * 2019-03-20 2019-07-09 浙江农林大学暨阳学院 A kind of statistical method of traffic flow based on road video and car plate detection
CN110111565A (en) * 2019-04-18 2019-08-09 中国电子科技网络信息安全有限公司 A kind of people's vehicle flowrate System and method for flowed down based on real-time video

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114092915A (en) * 2021-11-26 2022-02-25 阿波罗智联(北京)科技有限公司 Intersection traffic flow verification method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN112950961B (en) 2022-07-08

Similar Documents

Publication Publication Date Title
CN112528878B (en) Method and device for detecting lane line, terminal equipment and readable storage medium
CN108986465B (en) Method, system and terminal equipment for detecting traffic flow
CN106991820B (en) Illegal vehicle processing method and device
CN111192461B (en) License plate recognition method, server, parking charging method and system
CN111582032A (en) Pedestrian detection method and device, terminal equipment and storage medium
CN111079621A (en) Method and device for detecting object, electronic equipment and storage medium
CN113869137A (en) Event detection method and device, terminal equipment and storage medium
CN112950961B (en) Traffic flow statistical method, device, equipment and storage medium
CN115170851A (en) Image clustering method and device
CN114299030A (en) Object detection model processing method, device, equipment and storage medium
CN117058912A (en) Method and device for detecting abnormal parking of inspection vehicle, storage medium and electronic equipment
CN113239738B (en) Image blurring detection method and blurring detection device
CN115965636A (en) Vehicle side view generating method and device and terminal equipment
CN115731179A (en) Track component detection method, terminal and storage medium
CN112416128B (en) Gesture recognition method and terminal equipment
CN112216133B (en) Information pushing method, device, equipment and medium
CN114724128A (en) License plate recognition method, device, equipment and medium
CN111161542B (en) Vehicle identification method and device
CN115082326A (en) Processing method for deblurring video, edge computing equipment and central processor
CN112270257A (en) Motion trajectory determination method and device and computer readable storage medium
CN109949335B (en) Image processing method and device
CN112597924B (en) Electric bicycle track tracking method, camera device and server
CN111191603A (en) Method and device for identifying people in vehicle, terminal equipment and medium
CN115861624B (en) Method, device, equipment and storage medium for detecting occlusion of camera
CN114926973B (en) Video monitoring method, device, system, server and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant