WO2023019936A1 - 一种车辆行驶行为检测方法、装置、设备和存储介质 - Google Patents

一种车辆行驶行为检测方法、装置、设备和存储介质 Download PDF

Info

Publication number
WO2023019936A1
WO2023019936A1 PCT/CN2022/081772 CN2022081772W WO2023019936A1 WO 2023019936 A1 WO2023019936 A1 WO 2023019936A1 CN 2022081772 W CN2022081772 W CN 2022081772W WO 2023019936 A1 WO2023019936 A1 WO 2023019936A1
Authority
WO
WIPO (PCT)
Prior art keywords
vehicle
track point
track
displacement
points
Prior art date
Application number
PCT/CN2022/081772
Other languages
English (en)
French (fr)
Inventor
张先炳
邸硕临
薛志强
武伟
Original Assignee
上海商汤智能科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 上海商汤智能科技有限公司 filed Critical 上海商汤智能科技有限公司
Publication of WO2023019936A1 publication Critical patent/WO2023019936A1/zh

Links

Images

Classifications

    • BPERFORMING OPERATIONS; TRANSPORTING
    • B60VEHICLES IN GENERAL
    • B60WCONJOINT CONTROL OF VEHICLE SUB-UNITS OF DIFFERENT TYPE OR DIFFERENT FUNCTION; CONTROL SYSTEMS SPECIALLY ADAPTED FOR HYBRID VEHICLES; ROAD VEHICLE DRIVE CONTROL SYSTEMS FOR PURPOSES NOT RELATED TO THE CONTROL OF A PARTICULAR SUB-UNIT
    • B60W30/00Purposes of road vehicle drive control systems not related to the control of a particular sub-unit, e.g. of systems using conjoint control of vehicle sub-units
    • B60W30/08Active safety systems predicting or avoiding probable or impending collision or attempting to minimise its consequences
    • B60W30/095Predicting travel path or likelihood of collision
    • B60W30/0956Predicting travel path or likelihood of collision the prediction being responsive to traffic or environmental parameters
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B60VEHICLES IN GENERAL
    • B60WCONJOINT CONTROL OF VEHICLE SUB-UNITS OF DIFFERENT TYPE OR DIFFERENT FUNCTION; CONTROL SYSTEMS SPECIALLY ADAPTED FOR HYBRID VEHICLES; ROAD VEHICLE DRIVE CONTROL SYSTEMS FOR PURPOSES NOT RELATED TO THE CONTROL OF A PARTICULAR SUB-UNIT
    • B60W40/00Estimation or calculation of non-directly measurable driving parameters for road vehicle drive control systems not related to the control of a particular sub unit, e.g. by using mathematical models
    • B60W40/02Estimation or calculation of non-directly measurable driving parameters for road vehicle drive control systems not related to the control of a particular sub unit, e.g. by using mathematical models related to ambient conditions
    • B60W40/04Traffic conditions
    • 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
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B60VEHICLES IN GENERAL
    • B60WCONJOINT CONTROL OF VEHICLE SUB-UNITS OF DIFFERENT TYPE OR DIFFERENT FUNCTION; CONTROL SYSTEMS SPECIALLY ADAPTED FOR HYBRID VEHICLES; ROAD VEHICLE DRIVE CONTROL SYSTEMS FOR PURPOSES NOT RELATED TO THE CONTROL OF A PARTICULAR SUB-UNIT
    • B60W2554/00Input parameters relating to objects
    • B60W2554/40Dynamic objects, e.g. animals, windblown objects
    • B60W2554/404Characteristics
    • B60W2554/4044Direction of movement, e.g. backwards

Definitions

  • the present disclosure relates to computer technology, and in particular to a vehicle driving behavior detection method, device, equipment and storage medium.
  • the vehicle driving behavior is mainly detected by manually analyzing live video. Such detection efficiency is low, dangerous behaviors cannot be detected in time, and it is easy to miss.
  • the present disclosure at least discloses a method for detecting vehicle driving behavior.
  • the method may include: acquiring a video stream; wherein, the video stream includes a preset lane and a specified direction of the lane; performing target detection and tracking on the vehicle in the video stream to obtain the corresponding driving position of the vehicle track; the driving track includes a plurality of track points indicating the position of the vehicle; for each track point in the plurality of track points, the track is determined according to the position information indicated by each track point in the track point
  • the displacement of the point relative to other trajectory points; in response to the angle between the displacement of any one of the plurality of trajectory points relative to other trajectory points and the specified direction is greater than or equal to a first preset threshold, and
  • the projection of the displacement in the prescribed direction is greater than or equal to a second preset threshold, and it is determined that the vehicle is not traveling in the prescribed direction.
  • the present disclosure also proposes a vehicle driving behavior detection device, including: an acquisition module for acquiring a video stream; wherein, the video stream includes a preset lane and a specified direction of the lane; a detection and tracking module for Carry out target detection and tracking on the vehicle in the video stream to obtain the corresponding driving trajectory of the vehicle; the driving trajectory includes a plurality of trajectory points indicating the position of the vehicle; the first determination module is used for For each track point in the plurality of track points, determine the displacement of the track point relative to other track points according to the position information indicated by the track point; the second determination module is configured to respond to the position information in the plurality of track points The angle between the displacement of any track point relative to other track points and the specified direction is greater than or equal to a first preset threshold, and the projection of the displacement in the specified direction is greater than or equal to a second preset threshold , determining that the vehicle does not travel in the specified direction.
  • the present disclosure also proposes an electronic device, including: a processor; a memory for storing executable instructions of the processor; wherein, the processor executes the executable instructions to realize vehicle driving as shown in any of the foregoing embodiments Behavioral detection methods.
  • the present disclosure also proposes a computer-readable storage medium, the storage medium stores a computer program, and the computer program is used to make a processor execute the vehicle driving behavior detection method as shown in any one of the foregoing embodiments.
  • the present disclosure also proposes a computer program product, which includes a computer program stored in a memory, and the computer is configured to cause a processor to execute the vehicle driving behavior detection method as shown in any one of the foregoing embodiments.
  • FIG. 1 is a method flow chart of a vehicle driving behavior detection method shown in the present disclosure
  • FIG. 2 is a schematic diagram of a vehicle driving trajectory shown in the present disclosure
  • FIG. 3 is a schematic diagram of a vehicle driving behavior detection process shown in the present disclosure
  • FIG. 4 is a schematic diagram of a vehicle driving behavior detection process shown in the present disclosure.
  • FIG. 5 is a schematic structural diagram of a vehicle driving behavior detection device shown in the present disclosure.
  • FIG. 6 is a schematic diagram of a hardware structure of an electronic device shown in the present disclosure.
  • the present disclosure proposes a vehicle driving behavior detection method.
  • the displacement of the track point relative to other track points may be determined according to the position information indicated by the track point.
  • the direction of the displacement represents the traveling direction of the vehicle
  • the projection of the displacement in a predetermined direction of the lane represents the traveling distance of the vehicle on the lane along the traveling direction.
  • this method also considers whether the projection of the displacement on the specified direction is greater than or equal to a threshold, that is, the Whether the above-mentioned vehicle has not driven in the prescribed direction for a certain distance. Therefore, on the one hand, it is possible to avoid misjudgment that may be caused by only detecting a deviation in the driving direction, that is, judging that the vehicle violates regulations, and improving detection accuracy.
  • the driving direction of the vehicle during the U-turn process will deviate greatly from the prescribed direction of the lane, but after the U-turn is completed, the vehicle will travel along the prescribed direction of the current lane. If it is only judged whether the direction of travel of the vehicle deviates too much, this type of behavior may be judged as not traveling in the prescribed direction, but in the present disclosure, it can be judged that the vehicle is not traveling in the wrong direction after turning around, but in the wrong direction. Therefore, it will not be falsely detected for such behavior. On the other hand, it can avoid the misjudgment caused by the jitter of the track point position due to the low target detection and tracking accuracy, thereby improving the detection accuracy.
  • FIG. 1 is a method flow chart of a vehicle driving behavior detection method shown in the present disclosure.
  • the detection method shown in FIG. 1 can be applied to electronic equipment (hereinafter referred to as equipment).
  • the electronic device may execute the method by carrying software logic corresponding to the device method.
  • the type of the electronic device may be a notebook computer, a computer, a server, a mobile phone, a PAD terminal, and the like.
  • the type of the electronic device is not particularly limited in the present disclosure.
  • the electronic device may also be a client device or a server device, which is not specifically limited here.
  • the method may include step S102 to step S108.
  • the device may be connected to several image acquisition devices deployed in traffic scenes.
  • the traffic scene may be a scene such as a highway, a crossroad, a T-junction, and the like.
  • the lane usually has a preset prescribed direction, that is, the driving direction of the lane or simply called the lane direction, and if the vehicle does not travel in the prescribed direction, it is an abnormal situation.
  • the present disclosure needs to detect a vehicle that is driving abnormally.
  • the image collection device can be used to collect images in traffic scenes in real time and send them to the device in the form of video streams.
  • the image acquisition device can perform vehicle driving behavior detection on the video stream.
  • the image acquisition device can determine for each lane whether the vehicle is driving in the specified direction corresponding to the lane, and if the vehicle does not drive in the corresponding specified direction, , it is determined that the driving behavior of the vehicle is abnormal.
  • the lane areas of multiple lanes and the prescribed driving direction of each lane may be marked in advance. By judging the positional relationship between the position of the vehicle and the lane areas of the multiple lanes, the current lane of the vehicle can be determined.
  • the vehicle running detection method for each lane is roughly the same, and may be referred to each other, and the vehicle running detection method for one lane is taken as an example for description below.
  • S104 Perform object detection and tracking on the vehicle in the video stream to obtain a driving trajectory corresponding to the vehicle; the driving trajectory includes a plurality of trajectory points indicating the location of the vehicle.
  • the track point indicates the location information of the vehicle.
  • the image acquisition device after the image acquisition device acquires the video stream, it can use a target detection algorithm to perform target detection on multiple images in the video stream to obtain vehicle images in the multiple images, and the same vehicle image position in multiple images.
  • the position information may be indicated by the center point coordinates of the detection frame of the vehicle detected by the target detection model. It can be understood that the position point of the vehicle in the image is the corresponding track point of the vehicle. In some embodiments, the center point of the vehicle detection frame may be determined as the corresponding track point of the vehicle.
  • the multiple images may refer to images selected from the video stream according to preset rules.
  • the preset rule may start from the first frame image of the video stream, and select a frame image every preset frame number or preset duration.
  • the same vehicle in the multiple images can be determined by the target tracking algorithm, and the positions of the same vehicle in the multiple images are determined according to the image acquisition sequence Arranged to get the driving trajectory corresponding to the same vehicle.
  • the driving trajectory may include a plurality of trajectory points arranged in chronological order.
  • the track point may indicate the location information of the vehicle.
  • the target detection algorithm may include: target detection based on FASTER-RCNN (Faster Region Convolutional Neural Networks, faster regional convolutional neural network).
  • the target tracking algorithm may include: by comparing the IOU (Intersection over Union) of the detection frames corresponding to the vehicles in two adjacent frames of images, and determining the two vehicles with the largest IOU as the same vehicle.
  • Fig. 2 is a schematic diagram of a vehicle driving trajectory shown in the present disclosure.
  • the driving trajectory shown in FIG. 2 may be the driving trajectory obtained by adopting S104.
  • the driving trajectory includes a plurality of trajectory points sorted in time sequence. Among them, the track point C is taken as the track point to be judged.
  • the track point to the left of the track point C is the track point before this point, that is, the track point whose time is earlier than the track point C.
  • the track point on the right side of the track point C is the track point located after the track point, that is, the track point whose time is later than the track point C.
  • the solid lines with arrows connecting each track point and track point C in FIG. 2 indicate the displacement of track point C relative to other track points corresponding to the vehicle.
  • the dotted line in Fig. 2 represents the trajectory connecting line between two trajectory points.
  • the direction of the displacement may represent the driving direction of the vehicle.
  • the direction of the displacement CP formed by the trajectory point C and the trajectory point P may indicate the approximate driving direction of the vehicle starting from the trajectory point C and reaching the trajectory point P.
  • the angle between the direction of the displacement and the specified direction may represent the degree of deviation between the driving direction of the vehicle and the specified direction, if the angle is greater than or equal to the first preset threshold (threshold that can be set according to business needs ), it can indicate that the vehicle’s driving direction deviates too much, and it may not be driving in the specified direction.
  • the projection of the displacement of track point C relative to other track points in a specified direction can represent the driving distance of the vehicle on the lane.
  • the projection of the displacement CP in a predetermined direction may represent the projection in a predetermined direction of the travel distance of the vehicle starting from the trajectory point C to the trajectory point P. If the projection is greater than or equal to the second preset threshold (threshold that can be set according to business requirements), it can be explained that the vehicle has traveled a certain distance in the direction of the CP, that is, the behavior of not traveling in the specified direction has actually occurred.
  • the second preset threshold threshold that can be set according to business requirements
  • the displacement between the two track points can be determined.
  • the coordinates of the earlier track point are the starting point of the displacement
  • the coordinates of the later track point are the end point of the displacement
  • the direction from the earlier track point to the later track point is the direction of the displacement.
  • trigonometric function theorems such as cosine theorem can be used for calculation.
  • the Pythagorean theorem can be used for calculation. The present disclosure does not specifically limit the manner of calculating the included angle and the projection.
  • the displacement of the track point relative to other track points may be determined according to the position information indicated by the track point.
  • the direction of the displacement represents the traveling direction of the vehicle
  • the projection of the displacement in a predetermined direction of the lane represents the traveling distance of the vehicle on the lane along the traveling direction.
  • this method also considers whether the projection of the displacement on the specified direction is greater than or equal to a threshold, that is, the Whether the above-mentioned vehicle has not driven in the prescribed direction for a certain distance. Therefore, on the one hand, it is possible to avoid misjudgment that may be caused by only detecting a deviation in the driving direction, that is, judging that the vehicle violates regulations, and improving detection accuracy.
  • the driving direction of the vehicle during the U-turn process will deviate greatly from the prescribed direction of the lane, but after the U-turn is completed, the vehicle will travel along the prescribed direction of the current lane. If it is only judged whether the direction of travel of the vehicle deviates too much, this type of behavior may be judged as not traveling in the prescribed direction, but in the present disclosure, it can be judged that the vehicle is not traveling in the wrong direction after turning around, but in the wrong direction. Therefore, it will not be falsely detected for such behavior. On the other hand, it can avoid the misjudgment caused by the jitter of the track point position due to the low target detection and tracking accuracy, thereby improving the detection accuracy.
  • one or more positions of the vehicle after arriving at the track point may be determined according to the position information indicated by the track point and one or more first track points after the track point.
  • the first displacement when performing S108, may be in response to the angle between any one of the one or more first displacements and the specified direction being greater than or equal to a first preset threshold, and the first displacement A projection of a displacement in the prescribed direction is greater than or equal to a second preset threshold, and it is determined that the vehicle is not traveling in the prescribed direction.
  • FIG. 3 is a schematic diagram of a vehicle driving behavior detection process shown in the present disclosure. As shown in FIG. 3 , when steps S106-S108 are executed, S31 can be executed starting from the first track point, and multiple track points are sequentially determined as the first track point according to the sorting order of track points, and S32 to S36 are executed.
  • execute S32 Starting from the end track point, execute S32, and determine the track point between the end track point and the first track point as the second track point in turn according to the reverse order of track point sorting; execute S33, determine the first track point and the first track point One or more first displacements formed by two trajectory points, judging whether the angle between any one of the one or more first displacements and the specified direction is greater than or equal to a first preset threshold, And whether the projection of the first displacement on the specified direction is greater than or equal to a second preset threshold.
  • S34 can be executed to determine that the vehicle’s driving direction deviates too much from the specified direction, and the vehicle does not follow the specified direction, and the vehicle has traveled a certain distance in the aforementioned direction, that is, the behavior of not traveling in the prescribed direction has actually occurred, so it can be determined that the vehicle is not traveling in the prescribed direction.
  • S35 can be executed to determine whether each track point between the end track point and the first track point is uniform. has been identified as the second track point. If each track point between the end track point and the first track point has been determined as the second track point, then execute S36; if each track point between the end track point and the first track point has not been determined the second track point, execute S32 to switch to the next second track point, and re-execute S33-S35.
  • Step S36 determine whether the plurality of trajectory points have been determined as the first trajectory point, if there is a first trajectory point that has not been determined in the plurality of trajectory points, perform S31 to switch to the next first trajectory point , and re-execute S32-S35; if the plurality of track points have been determined as the first track point, it can be determined that the vehicle is traveling in a specified direction of the lane, and the vehicle driving behavior detection is completed.
  • the vehicle’s traveling direction deviates greatly from the prescribed direction and still travels in the traveling direction for a certain distance, it can be determined that the vehicle is not traveling in the prescribed direction , so as to improve the accuracy of vehicle driving behavior detection.
  • the vehicle when performing S106, it may be determined according to the position information indicated by the first track point and one or more third track points before the first track point that the vehicle arrives at the first track point one or more previous second displacements; then it may respond that the angle between any one of the one or more second displacements and the specified direction is greater than or equal to the first preset threshold, and The projection of the second displacement in the prescribed direction is greater than or equal to a second preset threshold, and it is determined that the vehicle is not traveling in the prescribed direction.
  • the vehicle's driving direction deviates greatly from the prescribed direction, and the vehicle has already traveled a certain distance in this driving direction, it can be determined that the vehicle is not traveling in the prescribed direction, Thereby improving the accuracy of vehicle driving behavior detection.
  • the track point in response to the angle between the displacement of any one of the plurality of trajectory points relative to other trajectory points and the specified direction is greater than or equal to a first preset threshold, and the displacement is within The projection in the specified direction is greater than or equal to the second preset threshold, and the track point can be determined as the target track point.
  • the target track point may be a track point in the vehicle's driving track. Since the angle between the displacement of the target track point relative to other track points and the specified direction is greater than or equal to the first preset threshold, and the projection of the displacement in the specified direction is greater than or equal to the second preset A threshold is set, so it can be explained that the vehicle did not travel in the specified direction before or after the target track point. That is, if the above-mentioned target track point is included in the multiple track points included in the vehicle track, it may indicate that the vehicle is not traveling in the prescribed direction.
  • the target track point can be used to indicate whether the vehicle is traveling in a specified direction, to detect whether the target track point is included in the multiple track points, and to include the target track point in the multiple track points. In the case of the target track point, it is determined that the vehicle is not traveling in the specified direction, thereby realizing automatic detection of vehicle driving behavior and improving detection efficiency and timeliness.
  • the target track point included in the target track point is responsive to the target track point being included in the plurality of track points. Whether the number of track points is greater than or equal to a third preset threshold. In response to a number of the plurality of track points including the target track point being greater than or equal to a third preset threshold, it is determined that the vehicle is not traveling in the prescribed direction.
  • the third threshold includes a threshold set according to business requirements.
  • the number of the target trajectory points included in the driving trajectory is greater than or equal to the third preset threshold, it can be explained that there are multiple sections of the vehicle’s driving path that do not travel in the prescribed direction, which can help to avoid Due to misjudgments caused by accidental factors such as abnormal image detection, the accuracy of vehicle driving behavior detection is improved.
  • the track point when it is determined that the vehicle does not travel in the prescribed direction before and after a certain track point, the track point can be determined as a track point in the track not in the prescribed direction, thereby eliminating accidental detection At this track point, there is no misjudgment caused by the behavior of not driving in the prescribed direction, thereby improving the accuracy of vehicle driving detection.
  • the track point when it is determined that the vehicle does not travel in the specified direction before and after a certain track point, the track point can also be determined as the target track point, thereby improving the accuracy of determining the target track point. performance, thereby improving the accuracy of vehicle driving detection.
  • the multiple track points are sequentially determined as the first track point, and the position information indicated by the first track point and one or more third track points before the first track point may be used to determine the One or more second displacements of the vehicle before reaching the first track point, and according to the position information indicated by the first track point and one or more second track points after the first track point, determine the One or more first displacements of the vehicle after reaching the first trajectory point.
  • the vehicle When executing S108, it may respond to any one of the one or more second displacements and any one of the one or more first displacements between the specified direction and the specified direction. Angles are both greater than or equal to the first preset threshold, and the projections of the first displacement and the second displacement in the specified direction are both greater than or equal to the second preset threshold, it is determined that the vehicle does not comply with the specified direction of travel.
  • the track point Q and the track point C form the second displacement QC
  • the track point C and the track point P form the first displacement CP
  • the distance between the second displacement QC and the first displacement CP and the specified direction The included angles are greater than or equal to the first preset threshold, and the projections of the second displacement QC and the first displacement CP in the specified direction are greater than or equal to the second preset threshold, then it can be determined that the trajectory point C is before and after , the vehicle does not travel in the prescribed direction. At this time, determining that the vehicle does not travel in the prescribed direction can improve the accuracy of vehicle driving detection.
  • track point C can also be used as the target track point, and wait until each track point in the driving track has been determined as the first track point, and steps S106-S108 have been performed Afterwards, the number of target trajectory points may be counted, and if the number is greater than or equal to a third preset threshold, it may be determined that the vehicle is not traveling in the prescribed direction. In this way, the determination accuracy of the target track point can be improved, thereby improving the accuracy of vehicle driving detection.
  • FIG. 4 is a schematic diagram of a vehicle driving behavior detection process shown in the present disclosure. As shown in Figure 4, when executing S106-S108, you can start from the first track point, execute S41, and determine multiple track points as the first track point in sequence according to the sorting order of track points, and execute S42 to S48.
  • Execute S42 in the order from back to front, use the track point before the first track point as the third track point, and execute S43, judge the one or the other formed by the third track point and the first track point Whether the included angle between any one of the multiple second displacements and the specified direction is greater than or equal to the first preset threshold, and whether the projection of the second displacement on the specified direction is greater than or equal to the first Two preset thresholds.
  • S44 can be executed to determine whether the track points before the first track point have all been determined as the third track point. If all the track points before the first track point have been determined as the third track point, then it is determined that the first track point is not the target track point, and switch to the next first track point, and continue to execute S42-S44. If there is an undetermined third track point in the track point before the first track point, switch the third track point and execute S43-S44.
  • S45 can be executed, and the track point after the first track point is used as the first track point in the order from front to back.
  • two track points and execute S46 to determine whether the angle between any one of the one or more first displacements formed by the first track point and the second track point and the specified direction is greater than or equal to a first preset threshold, and whether the projection of the first displacement in the specified direction is greater than or equal to a second preset threshold.
  • S47 may be executed to determine the first track point as the target track point.
  • S48 can be executed to determine whether all track points after the first track point have been determined as the second track point. If all the track points after the first track point have been determined as the second track point, it is determined that the first track point is not the target track point, and switch to the next first track point, and continue to execute S42-S48. If there is an undetermined second track point at the track point after the first track point, switch to the next second track point and execute S46-S48.
  • the plurality of track points After the plurality of track points have been determined as the first track point, it can be determined whether the number of target track points is greater than or equal to the third threshold, and if so, it can be determined that the vehicle is not traveling in a prescribed direction. If not, it may be determined that the vehicle is traveling in a prescribed direction, and the detection of the vehicle's driving behavior is completed.
  • the method before performing S106, the method further includes: determining an internal track point indicating that the vehicle is in the lane among the plurality of track points.
  • the displacement of the internal track point relative to other internal track points may be determined according to the position information indicated by the internal track point.
  • this processing can reduce the workload and improve the detection efficiency; on the other hand, it can eliminate the influence of the track points not in the lane on the driving behavior of the vehicle, and improve the accuracy of driving behavior detection.
  • target detection may also be performed on the wheels of the vehicle in the video stream to obtain position information corresponding to each wheel when the vehicle is at each track point.
  • multiple images can be selected from the video stream for target detection according to the target detection algorithm, and the position of the track point of the vehicle in the image can be obtained, and the detection frame including the wheel can be obtained. Then the coordinates of the center point of each wheel detection frame can be determined as the position of each wheel.
  • the internal trajectory point for each trajectory point in the plurality of trajectory points, it can be determined whether the number of wheels in the lane is greater than or equal to the fourth preset threshold (empirical threshold). In response to the number of wheels in the lane being greater than or equal to a fourth preset threshold, the track point corresponding to the vehicle is determined as an internal track point in the lane.
  • the fourth preset threshold empirical threshold
  • the method for determining whether the wheel is in the lane may include: comparing the coordinates of the four wheels with the coordinates of the four vertices of the lane, if the abscissa value of the wheel is between the minimum abscissa and the maximum abscissa of the lane, and If the ordinate of the wheel is between the minimum ordinate and the maximum ordinate of the lane, it can be determined that the vehicle is in the lane. It should be noted that the present disclosure does not specifically limit the method for determining whether the wheels are in the lane.
  • the internal track point can be determined more accurately, thereby improving the detection of vehicle driving behavior accuracy.
  • a warning message may be sent in response to the vehicle not traveling in the prescribed direction. This enables instant warning.
  • the device can be connected to the hand-held terminal of the traffic police in a wireless manner. When the device determines that a certain vehicle is not traveling in the specified direction of the lane, it can generate warning information and send it to the hand-held terminal of the traffic police for timely warning.
  • the warning information may include at least one of the following: a preferred image in the collected video stream that meets preset conditions; an area map surrounded by a vehicle detection frame in the preferred image, such as a vehicle image; The first image corresponding to the start time when the vehicle does not travel in the prescribed direction; the second image corresponding to the end time when the vehicle does not travel in the prescribed direction; and the vehicle information of the vehicle.
  • the preferred image may refer to an image in which the vehicle is not at the edge of the image in the video stream, the definition of the vehicle is high, and the vehicle target is large enough.
  • a supervised training neural network for selecting preferred images may be used to select preferred images satisfying the aforementioned preset conditions from the video stream.
  • the area map may be an area map surrounded by vehicle detection frames obtained by performing target detection on the preferred image.
  • the area map can include clear vehicle targets.
  • the first image may include an image corresponding to the earliest target track point.
  • the collection time corresponding to the image may indicate the starting time when the vehicle does not travel in the specified direction.
  • the second image may be an image corresponding to the latest target track point.
  • the collection time corresponding to the image may indicate the end time when the vehicle does not travel in the specified direction.
  • the vehicle information of the vehicle may include license plate number, license plate color, license plate type, vehicle type, vehicle color and other information that is convenient for identifying the vehicle.
  • the warning information includes the above-mentioned various information, which can completely output the event that the vehicle does not drive in the prescribed direction, which is convenient for manual research and judgment and evidence collection.
  • the images included in the warning information can be combined into one frame of image for output, which facilitates intuitive observation of the event that the vehicle does not drive in the specified direction, facilitates manual research and judgment and evidence collection, and reduces storage costs.
  • Embodiments will be described below in conjunction with vehicle reverse-travel detection scenarios.
  • cameras can be deployed at lane locations.
  • the camera can collect video streams.
  • the video stream may include multiple lanes.
  • the camera can collect video streams in real time and send them to the monitoring equipment connected to the camera.
  • the monitoring device can be used for vehicle retrograde detection.
  • the four vertex coordinates of each lane and the prescribed driving direction of each lane are pre-maintained in the monitoring device.
  • the monitoring device can determine the current target lane of the vehicle and multiple track points of the vehicle in the video stream by analyzing the position of the vehicle in the video stream. It is also possible to obtain, by analyzing the positions of the wheels of the vehicle in the video stream, the position points corresponding to the four wheels of a certain vehicle when the four wheels are respectively at the plurality of track points.
  • the monitoring device can determine the plurality of track points as track points to be judged respectively, and according to the four vertex coordinates of the target lane, determine that when the vehicle is at the position corresponding to the track points to be judged, the Whether the number of wheels in the target lane is greater than or equal to 3 (the fourth preset threshold value), if so, then the track point to be judged can be determined as the internal track point of the target lane; if not, the track point to be judged can be determined to be The track point is not the internal track point.
  • the monitoring device can determine the target track points among the internal track points and determine whether the number of target track points is greater than or equal to 10 (the third preset threshold) by performing S41-S48, if greater than or equal to the third preset
  • the threshold value can determine that the vehicle is traveling in the wrong direction.
  • the monitoring device may select a preferred image from the video stream, extract a vehicle area map from the preferred image, determine the first image in which the vehicle starts to travel in reverse, and the second image in which the vehicle ends in retrograde, and send 4 images are fused into one fused image.
  • the monitoring device can also select information such as the color and model of the vehicle corresponding to the vehicle from the vehicle information database, and combine the fusion image to generate warning information and send it to the hand-held terminal of the traffic police to conduct target behavior research and judgment.
  • the present disclosure also proposes a vehicle driving behavior detection device 50 .
  • FIG. 5 is a schematic structural diagram of a vehicle driving behavior detection device shown in the present disclosure.
  • the detection device 50 may include: an acquisition module 51, configured to acquire a video stream; wherein, the video stream includes a preset lane and a prescribed direction of the lane; a detection and tracking module 52, It is used to detect and track the vehicle in the video stream to obtain the corresponding driving trajectory of the vehicle; the driving trajectory includes a plurality of trajectory points indicating the position of the vehicle; the first determining module 53 uses For each track point in the plurality of track points, according to the position information indicated by the track point, determine the displacement of the track point relative to other track points; the second determination module 54 is configured to respond to the plurality of The angle between the displacement of any one of the track points relative to the other track points and the specified direction is greater than or equal to a first preset threshold, and the projection of the displacement in the specified direction is greater than or equal to the first threshold. Two preset thresholds, determining that the vehicle does not travel in the prescribed direction
  • the device 50 further includes: a third determining module, configured to respond to the angle between the displacement of any one of the multiple track points relative to other track points and the specified direction is greater than or equal to a first preset threshold, and the projection of the displacement in the specified direction is greater than or equal to a second preset threshold, and the arbitrary track point is determined as a target track point.
  • a third determining module configured to respond to the angle between the displacement of any one of the multiple track points relative to other track points and the specified direction is greater than or equal to a first preset threshold, and the projection of the displacement in the specified direction is greater than or equal to a second preset threshold, and the arbitrary track point is determined as a target track point.
  • the second determination module 54 is configured to determine that the vehicle does not travel in the prescribed direction in response to the number of the target trajectory points being greater than or equal to a third preset threshold.
  • the first determination module 53 is configured to determine the position of the vehicle after arriving at the track point according to the track point and the position information indicated by one or more first track points after the track point. One or more first displacements.
  • the second determination module 54 is configured to respond to an angle between any one of the one or more first displacements and the specified direction greater than or equal to a first preset threshold, and the first displacement Projections of a displacement in the specified direction are greater than or equal to a second preset threshold, and it is determined that the vehicle does not travel in the specified direction.
  • the first determination module 53 is configured to: determine one or more positions of the vehicle before arriving at the track point according to the position information indicated by the track point and one or more previous second track points. Multiple second displacements.
  • the second determination module 54 is configured to respond to an angle between any one of the one or more second displacements and the specified direction greater than or equal to a first preset threshold, and the second displacement If the projection in the prescribed direction is greater than or equal to a second preset threshold, it is determined that the vehicle does not travel in the prescribed direction.
  • the first determination module 53 is configured to determine, according to the position information indicated by the track point and one or more second track points before the track point, that the vehicle arrives at the first track point One or more second displacements before; according to the position information indicated by the track point and one or more first track points after the track point, determine the one or more first track points after the vehicle arrives at the track point displacement.
  • the second determination module 54 is configured to respond to any one of the one or more second displacements and any one of the one or more first displacements and the specified direction The angles between them are both greater than or equal to the first preset threshold, and the projections of the second displacement and the first displacement in the specified direction are both greater than or equal to the second preset threshold, it is determined that the vehicle has not Drive in the specified direction.
  • the apparatus 50 further includes: a fourth determining module, configured to determine an internal track point indicating that the vehicle is in the lane among the plurality of track points.
  • the first determination module 53 is configured to determine the displacement of the internal track point relative to other internal track points according to the position information indicated by the internal track point.
  • the device 50 further includes: a detection module, configured to perform target detection on the wheels of the vehicle in the video stream, and obtain the vehicle's wheels when the vehicle is at the track point corresponding location information.
  • a detection module configured to perform target detection on the wheels of the vehicle in the video stream, and obtain the vehicle's wheels when the vehicle is at the track point corresponding location information.
  • the fourth determination module is configured to, for each of the plurality of track points, determine whether the number of wheels in the lane is greater than or equal to a fourth preset threshold; in response to the number of wheels in the lane being greater than or equal to a fourth preset threshold, determining the track point corresponding to the vehicle as an internal track point in the lane.
  • the device 50 further includes: a warning module, configured to send warning information in response to the vehicle not traveling in the prescribed direction.
  • the warning information includes at least one of the following: a preferred image in the video stream that satisfies a preset condition; an area map surrounded by a vehicle detection frame in the preferred image; The first image corresponding to the start time of driving in the prescribed direction; the second image corresponding to the end time of the vehicle not traveling in the prescribed direction; vehicle information of the vehicle.
  • the device 50 further includes: an output module, configured to combine the images included in the alarm information into one frame of images for output.
  • Embodiments of the vehicle driving behavior detection device shown in the present disclosure can be applied to electronic equipment. Accordingly, the present disclosure discloses an electronic device, which may include: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to call the executable instructions stored in the memory , realizing the vehicle driving behavior detection method shown in any one of the foregoing embodiments.
  • FIG. 6 is a schematic diagram of a hardware structure of an electronic device shown in the present disclosure.
  • the electronic device may include a processor 601 for executing instructions, a network interface 602 for network connection, a memory 603 for storing operating data for the processor, and a memory 603 for storing vehicle driving behavior detection
  • the device corresponds to a non-volatile memory 604 for instructions, wherein the processor 601 , the network interface 602 , the memory 603 and the non-volatile memory 604 are coupled through an internal bus 605 .
  • the embodiment of the apparatus may be implemented by software, or by hardware or a combination of software and hardware.
  • software implementation as an example, as a device in a logical sense, it is formed by reading the corresponding computer program instructions in the non-volatile memory into the memory for operation by the processor of the electronic device where it is located.
  • the electronic device where the device in the embodiment is usually based on the actual function of the electronic device can also include other Hardware, no more details on this.
  • the device corresponding instructions may also be directly stored in the memory, which is not limited herein.
  • the present disclosure proposes a computer-readable storage medium, the storage medium stores a computer program, and the computer program can be used to make a processor execute the vehicle driving behavior detection method shown in any of the foregoing embodiments.
  • one or more embodiments of the present disclosure may be provided as a method, system or computer program product. Accordingly, one or more embodiments of the present disclosure may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, one or more embodiments of the present disclosure may employ a computer implemented on one or more computer-usable storage media (which may include, but are not limited to, disk storage, CD-ROM, optical storage, etc.) with computer-usable program code embodied therein. The form of the Program Product.
  • Embodiments of the subject matter and functional operations described in this disclosure can be implemented in digital electronic circuitry, tangibly embodied computer software or firmware, computer hardware that may include the structures disclosed in this disclosure and their structural equivalents, or their A combination of one or more of them.
  • Embodiments of the subject matter described in this disclosure can be implemented as one or more computer programs, i.e. one or more of computer program instructions encoded on a tangible, non-transitory program carrier for execution by or to control the operation of data processing apparatus. Multiple modules.
  • the program instructions may be encoded on an artificially generated propagated signal, such as a machine-generated electrical, optical or electromagnetic signal, which is generated to encode and transmit information to a suitable receiver device for transmission by the data
  • the processing means executes.
  • a computer storage medium may be a machine-readable storage device, a machine-readable storage substrate, a random or serial access memory device, or a combination of one or more of them.
  • the processes and logic flows described in this disclosure can be performed by one or more programmable computers executing one or more computer programs to perform corresponding functions by operating on input data and generating output.
  • the processes and logic flows can also be performed by, and apparatus can also be implemented as, special purpose logic circuitry, such as an FPGA (Field Programmable Gate Array) or an ASIC (Application Specific Integrated Circuit).
  • FPGA Field Programmable Gate Array
  • ASIC Application Specific Integrated Circuit
  • a computer suitable for the execution of a computer program may include, for example, a general and/or special purpose microprocessor, or any other type of central processing unit.
  • a central processing unit will receive instructions and data from a read only memory and/or a random access memory.
  • the basic components of a computer can include a central processing unit, which can be used to implement or execute instructions, and one or more memory devices, which can be used to store instructions and data.
  • a computer will also include, or be operably coupled to, one or more mass storage devices, such as magnetic or magneto-optical disks, or optical disks, which can be used to store data, or to receive data therefrom or send data to it, or both.
  • mass storage devices such as magnetic or magneto-optical disks, or optical disks, which can be used to store data, or to receive data therefrom or send data to it, or both.
  • mass storage devices such as magnetic or magneto-optical disks, or optical disks, which can be used to store data, or to receive data therefrom or
  • a computer may be embedded in another device such as a mobile phone, a personal digital assistant (PDA), a mobile audio or video player, a game console, a Global Positioning System (GPS) receiver, or a device such as a Universal Serial Bus (USB) ) portable storage devices like flash drives, to name a few.
  • PDA personal digital assistant
  • GPS Global Positioning System
  • USB Universal Serial Bus
  • Computer-readable media suitable for storing computer program instructions and data may include all forms of non-volatile memory, media and memory devices and may include, for example, semiconductor memory devices such as EPROM, EEPROM and flash memory devices, magnetic disks such as internal hard drives or removable disks), magneto-optical disks, and CD ROM and DVD-ROM disks.
  • semiconductor memory devices such as EPROM, EEPROM and flash memory devices
  • magnetic disks such as internal hard drives or removable disks
  • magneto-optical disks and CD ROM and DVD-ROM disks.
  • the processor and memory can be supplemented by, or incorporated in, special purpose logic circuitry.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Biomedical Technology (AREA)
  • General Engineering & Computer Science (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Artificial Intelligence (AREA)
  • General Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Automation & Control Theory (AREA)
  • Transportation (AREA)
  • Mechanical Engineering (AREA)
  • Traffic Control Systems (AREA)

Abstract

一种车辆行驶行为检测方法、装置、设备和存储介质。其中该方法包括:获取视频流;其中视频流中包括预设的车道和车道的规定方向;对视频流中的车辆进行目标检测与跟踪,得到车辆对应的行驶轨迹,行驶轨迹包括指示车辆所处位置的多个轨迹点;根据多个轨迹点中各轨迹点指示的位置信息,确定各轨迹点相对于其它轨迹点的位移;响应于多个轨迹点中的任一个轨迹点相对于其它轨迹点的位移与规定方向之间的夹角大于或等于第一预设阈值,且位移在规定方向上的投影大于或等于第二预设阈值,确定车辆未按照规定方向行驶。

Description

一种车辆行驶行为检测方法、装置、设备和存储介质
相关申请交叉引用
本申请主张申请号为202110944033.1、申请日为2021年8月17日的中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。
技术领域
本公开涉及计算机技术,具体涉及一种车辆行驶行为检测方法、装置、设备和存储介质。
背景技术
在交通场景下经常出现车辆不按照道路规定的方向行驶的情况。例如,车辆逆行或者倒车。这些情况可能影响道路车辆正常行驶,严重时还会导致交通事故,存在较大安全隐患。
目前主要通过人工对现场视频进行分析的方式对车辆行驶行为进行检测。如此检测效率较低,无法及时发现危险行为,并且容易出现遗漏的情况。
发明内容
有鉴于此,本公开至少公开一种车辆行驶行为检测方法。该方法可以包括:获取视频流;其中,所述视频流中包括预设的车道和所述车道的规定方向;对所述视频流中的车辆进行目标检测与跟踪,得到所述车辆对应的行驶轨迹;所述行驶轨迹包括指示所述车辆所处位置的多个轨迹点;针对所述多个轨迹点中的每个轨迹点,根据该轨迹点中各轨迹点指示的位置信息,确定该轨迹点相对于其它轨迹点的位移;响应于所述多个轨迹点中的任一个轨迹点相对于其它轨迹点的位移与所述规定方向之间的夹角大于或等于第一预设阈值,且所述位移在所述规定方向上的投影大于或等于第二预设阈值,确定所述车辆未按照所述规定方向行驶。
本公开还提出一种车辆行驶行为检测装置,包括:获取模块,用于获取视频流;其中,所述视频流中包括预设的车道和所述车道的规定方向;检测与跟踪模块,用于对所述视频流中的车辆进行目标检测与跟踪,得到所述车辆对应的行驶轨迹;所述行驶轨迹包括指示所述车辆所处位置的多个轨迹点;第一确定模块,用于针对所述多个轨迹点中的每个轨迹点,根据该轨迹点指示的位置信息,确定该轨迹点相对于其它轨迹点的位移;第二确定模块,用于响应于所述多个轨迹点中的任一个轨迹点相对于其它轨迹点的位移与所述规定方向之间的夹角大于或等于第一预设阈值,且所述位移在所述规定方向上的投影大于或等于第二预设阈值,确定所述车辆未按照所述规定方向行驶。
本公开还提出一种电子设备,包括:处理器;用于存储处理器可执行指令的存储器;其中,所述处理器通过运行所述可执行指令以实现如前述任一实施例示出的车辆行驶行为检测方法。
本公开还提出一种计算机可读存储介质,所述存储介质存储有计算机程序,所述计 算机程序用于使处理器执行如前述任一实施例示出的车辆行驶行为检测方法。
本公开还提出一种计算机程序产品,包括存储于存储器中的计算机程序,所述计算机用于使处理器执行如前述任一实施例示出的车辆行驶行为检测方法。
应当理解的是,以上所述的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。
附图说明
为了更清楚地说明本公开一个或多个实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显见地,下面描述中的附图仅仅是本公开一个或多个实施例中记载的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本公开示出的一种车辆行驶行为检测方法的方法流程图;
图2为本公开示出的一种车辆行驶轨迹示意图;
图3为本公开示出的一种车辆行驶行为检测流程示意图;
图4为本公开示出的一种车辆行驶行为检测流程示意图;
图5为本公开示出的一种车辆行驶行为检测装置的结构示意图;
图6为本公开示出的一种电子设备的硬件结构示意图。
具体实施方式
下面将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本公开相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本公开的一些方面相一致的设备和方法的例子。
在本公开使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本公开。在本公开和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在可以包括多数形式,除非上下文清楚地表示其他含义。还应当理解,本文中使用的术语“和/或”是指并包含一个或多个相关联的列出项目的任何或所有可能组合。还应当理解,本文中所使用的词语“如果”,取决于语境,可以被解释成为“在……时”或“当……时”或“响应于确定”。
基于此,本公开提出一种车辆行驶行为检测方法。该方法可以针对所述多个轨迹点中的每个轨迹点,根据该轨迹点指示的位置信息,确定该轨迹点相对其它轨迹点的位移。其中,所述位移的方向表示所述车辆的行驶方向,所述位移在车道的规定方向上的投影表示所述车辆在所述车道上沿所述行驶方向的行驶距离。响应于所述多个轨迹点中任一个轨迹点相对于其它轨迹点的位移与所述规定方向之间的夹角大于或等于第一预设阈值,且所述位移在所述规定方向上的投影大于或等于第二预设阈值,可以确定所述车辆的行驶方向与规定方向偏离较大,并且已经行驶一段距离,从而确定车辆未按照所述规 定方向行驶,实现车辆行驶行为的自动检测,提升检测效率与及时性。
另外,该方法除了利用所述位移与规定方向之间的夹角判断车辆的行驶方向是否偏离过大之外,还考虑所述位移在所述规定方向上的投影是否大于或等于阈值,即所述车辆是否未按规定方向行驶一定距离。由此,一方面,可避免仅检测到行驶方向偏离即判断车辆违规可能造成的误判,提升检测准确性。例如,在车辆掉头后沿着所述规定方向行驶的行为中,车辆掉头过程中的行驶方向会与车道规定方向偏离较大,但是完成掉头后车辆会沿着当前车道的规定方向行驶。如果只判断车辆的行驶方向是否偏离过大,则可能将这类行为判断为未按规定方向行驶的行为,但是在本公开中可以判断出车辆掉头后并非沿着错误的方向行驶,而是沿着掉头后所在当前车道的规定方向行驶,因此不会对这类行为误检。另一方面,可以避免由于目标检测与跟踪精度不高导致轨迹点位置抖动而带来的误判断,从而提升检测准确性。
图1为本公开示出的一种车辆行驶行为检测方法的方法流程图。图1示出的检测方法可以应用于电子设备(以下简称设备)中。其中,所述电子设备可以通过搭载与设备方法对应的软件逻辑执行该方法。所述电子设备的类型可以是笔记本电脑、计算机、服务器、手机、PAD终端等。在本公开中不特别限定所述电子设备的类型。所述电子设备也可以是客户端设备或服务端设备,在此不作特别限定。
如图1所示,所述方法可以包括步骤S102至步骤S108。
S102,获取视频流;其中,所述视频流中包括预设的车道和所述车道的规定方向。
在一些实施例中,所述设备可以与交通场景中部署的若干图像采集设备连接。所述交通场景可以是诸如高速路、十字路口、丁字路口等场景。该场景中通常可以至少包括一条车道。所述车道通常具有预设的规定方向,即车道的行车方向或者简称为车道方向,如果车辆未按照所述规定方向行驶则属于异常情形。本公开需要检测出行驶异常的车辆。所述图像采集设备可以用于实时采集交通场景中的图像,并以视频流的形式发送至所述设备。所述图像采集设备可以针对视频流进行车辆行驶行为检测。
需要说明的是,当场景中包括多条车道时,所述图像采集设备可以针对每一条车道,确定车辆是否按照该车道对应的规定方向行驶,并在车辆未按照对应的规定方向行驶的情形下,确定车辆行驶行为异常。在一些实施例中,可以预先标注多条车道的车道区域以及各条车道规定的行驶方向。通过判断车辆的位置与多条车道的车道区域之间的位置关系,可以确定车辆当前所在的车道。
其中,针对每一条车道的车辆行驶检测方法大致相同,可以相互参照,以下以针对一条车道的车辆行驶检测方法为例进行说明。
S104,对所述视频流中的车辆进行目标检测与跟踪,得到所述车辆对应的行驶轨迹;所述行驶轨迹包括指示所述车辆所处位置的多个轨迹点。
所述轨迹点指示所述车辆所处的位置信息。
在一些实施例中,所述图像采集设备在获取视频流后,可以利用目标检测算法,针对视频流中的多张图像,进行目标检测,得到所述多张图像中的车辆图像,以及同一车辆在多张图像中所处的位置。在一些实施例中,可以通过目标检测模型检测出的车辆的 检测框的中心点坐标指示所述位置信息。可以理解的是,车辆在图像中所处的位置点即为车辆对应的轨迹点。在一些实施例中,可以将车辆检测框的中心点确定为该车辆对应的轨迹点。
所述多张图像可以是指按照预设规则从视频流中选取出的图像。所述预设规则可以是从视频流第一帧图像开始,每隔预设帧数或预设时长选取一帧图像。
在检测出所述多张图像中的车辆图像后,可以通过目标跟踪算法确定多张图像中的同一车辆,并将同一车辆在所述多张图像中分别所处的位置,按照图像采集时序进行排列,得到同一车辆对应的行驶轨迹。其中,所述行驶轨迹可以包括按照时间顺序排列的多个轨迹点。所述轨迹点可以指示所述车辆所处的位置信息。
需要说明的是,本公开不特别限定使用的目标检测算法与目标跟踪算法。示例性的,所述目标检测算法可以包括:基于FASTER-RCNN(Faster Region Convolutional Neural Networks,更快速的区域卷积神经网络)进行目标检测。所述目标跟踪算法可以包括:通过比较相邻两帧图像中各车辆对应的检测框的IOU(Intersection over Union,交并比),并将IOU最大的两个车辆确定为同一车辆。
S106,针对所述多个轨迹点中的每个轨迹点,根据该轨迹点指示的位置信息,确定该轨迹点相对于其它轨迹点的位移。
图2为本公开示出的一种车辆行驶轨迹示意图。图2示出的行驶轨迹可以是采用S104得到的行驶轨迹。所述行驶轨迹中包括按照时序排序的多个轨迹点。其中,将轨迹点C作为待判轨迹点。轨迹点C左边的轨迹点为位于该点之前的轨迹点,即时刻早于轨迹点C的轨迹点。轨迹点C右边的轨迹点为位于该轨迹点之后的轨迹点,即时刻晚于轨迹点C的轨迹点。图2中各轨迹点与轨迹点C相连的带箭头的实线表示轨迹点C相对于该车辆对应的其他轨迹点之间的位移。图2中的虚线代表两个轨迹点之间的轨迹连线。
所述位移的方向,可以表示所述车辆的行驶方向。例如,轨迹点C与轨迹点P形成的位移CP的方向,可以表示车辆从轨迹点C出发达到轨迹点P需要的大致行驶方向。所述位移的方向与规定方向之间的夹角可以表示车辆行驶方向相对于规定方向之间的偏离程度,如果所述夹角大于或等于第一预设阈值(可以根据业务需求设定的阈值),则可以说明车辆行驶方向偏离过大,可能未按照规定方向行驶。
轨迹点C相对于其他轨迹点的位移在规定方向上的投影,可以表示车辆在车道上的行驶距离。例如,位移CP在规定方向上的投影,可以表示车辆从轨迹点C出发达到轨迹点P的行驶距离在规定方向上的投影。如果所述投影大于或等于第二预设阈值(可以根据业务需求设定的阈值),则可以说明车辆已经按照CP行驶方向行驶了一段距离,即实际发生了未按照规定方向行驶的行为。
在一些实施例中,根据两个轨迹点对应的坐标和轨迹点的创建时刻,可以确定两个轨迹点之间的位移。其中时刻早的轨迹点的坐标为位移的起点,时刻晚的轨迹点的坐标为位移的终点,由时刻早的轨迹点到时刻晚的轨迹点的方向为所述位移的方向。
在计算位移与规定方向的夹角时,可以采用余弦定理等三角函数定理进行计算。在 计算位移在规定方向上的投影时,可以采用勾股定理进行计算。本公开不对计算所述夹角和所述投影的方式进行特别限定。
S108,响应于所述多个轨迹点中的任一个轨迹点相对于其它轨迹点的位移与所述规定方向之间的夹角大于或等于第一预设阈值,且所述位移在所述规定方向上的投影大于或等于第二预设阈值,确定所述车辆未按照所述规定方向行驶。
在前述方案中,针对所述多个轨迹点中的每个轨迹点,可以根据该轨迹点指示的位置信息,确定该轨迹点相对其它轨迹点的位移。其中,所述位移的方向表示所述车辆的行驶方向,所述位移在车道的规定方向上的投影表示所述车辆在所述车道上沿所述行驶方向的行驶距离。然后响应于所述多个轨迹点中任一个轨迹点相对于其它轨迹点的位移与所述规定方向之间的夹角大于或等于第一预设阈值,且所述位移在所述规定方向上的投影大于或等于第二预设阈值,可以确定所述车辆的行驶方向与规定方向偏离较大,并且已经行驶一段距离,从而确定车辆未按照所述规定方向行驶,实现车辆行驶行为的自动检测,提升检测效率与及时性。
另外,该方法除了利用所述位移与规定方向之间的夹角判断车辆的行驶方向是否偏离过大之外,还考虑所述位移在所述规定方向上的投影是否大于或等于阈值,即所述车辆是否未按规定方向行驶一定距离。由此,一方面,可避免仅检测到行驶方向偏离即判断车辆违规可能造成的误判,提升检测准确性。例如,在车辆掉头后沿着所述规定方向行驶的行为中,车辆掉头过程中的行驶方向会与车道规定方向偏离较大,但是完成掉头后车辆会沿着当前车道的规定方向行驶。如果只判断车辆的行驶方向是否偏离过大,则可能将这类行为判断为未按规定方向行驶的行为,但是在本公开中可以判断出车辆掉头后并非沿着错误的方向行驶,而是沿着掉头后所在当前车道的规定方向行驶,因此不会对这类行为误检。另一方面,可以避免由于目标检测与跟踪精度不高导致轨迹点位置抖动而带来的误判断,从而提升检测准确性。
在一些实施例中,在执行S106时,可以根据该轨迹点和该轨迹点之后的一个或多个第一轨迹点指示的位置信息,确定所述车辆在到达该轨迹点之后的一个或多个第一位移,在执行S108时,可以响应于所述一个或多个第一位移中的任一个第一位移与所述规定方向之间的夹角大于或等于第一预设阈值,且该第一位移在所述规定方向上的投影大于或等于第二预设阈值,确定所述车辆未按照所述规定方向行驶。
图3为本公开示出的一种车辆行驶行为检测流程示意图。如图3所示,在执行步骤S106-S108时,可以从首个轨迹点开始,执行S31,按照轨迹点排序顺序,将多个轨迹点依次确定为第一轨迹点,并执行S32至S36。
由末尾轨迹点开始,执行S32,按照轨迹点排序逆序,依次将末尾轨迹点到第一轨迹点之间的轨迹点确定为第二轨迹点;执行S33,确定该第一轨迹点与所述第二轨迹点形成的一个或多个第一位移,判断所述一个或多个第一位移中的任一个第一位移与所述规定方向之间的夹角是否大于或等于第一预设阈值,且所述第一位移在所述规定方向上的投影是否大于或等于第二预设阈值。
如果所述夹角大于或等于第一预设阈值,并且所述投影大于或等于第二预设阈值,则可以执行S34,确定车辆的行驶方向与规定方向偏离过大,所述车辆未按照规定方向 行驶,且车辆已经按照前述行驶方向行驶了一段距离,即实际发生了未按照规定方向行驶的行为,因此即可确定所述车辆未按照所述规定方向行驶。
如果前述夹角未大于或等于第一预设阈值和/或前述投影未大于或等于第二预设阈值,则可以执行S35,确定末尾轨迹点到第一轨迹点之间的各轨迹点是否均已被确定过为第二轨迹点。如果末尾轨迹点到第一轨迹点之间的各轨迹点均已被确定过为第二轨迹点,则执行S36;如果末尾轨迹点到第一轨迹点之间的各轨迹点存在未被确定过的第二轨迹点,则执行S32切换到下一个第二轨迹点,并重新执行S33-S35。步骤S36,确定所述多个轨迹点是否均已被确定过为第一轨迹点,如果所述多个轨迹点存在未被确定过的第一轨迹点,执行S31切换到下一个第一轨迹点,并重新执行S32-S35;如果所述多个轨迹点均已被被确定过为第一轨迹点,则可以确定所述车辆按照车道规定方向行驶,并完成车辆行驶行为检测。
请继续参见图2,假设第一轨迹点为轨迹点C,第一轨迹点为轨迹点P时,位移CP的方向与规定方向的夹角大于第一预设阈值,并且位移CP在规定方向上的投影也大于第二预设阈值,即可说明所述车辆发生了未按照规定方向行驶的行为。
由此在车辆达到任一个第一轨迹点C之后,所述车辆的行驶方向与规定方向偏离较大,并且仍然按照该行驶方向行驶一段距离的情形下,可以确定车辆未按照所述规定方向行驶,从而提升车辆行驶行为检测准确性。
在一些实施例中,在执行S106时,可以根据该第一轨迹点和该第一轨迹点之前的一个或多个第三轨迹点指示的位置信息,确定所述车辆在到达该第一轨迹点之前的一个或多个第二位移;然后可以响应于所述一个或多个第二位移中的任一个第二位移与所述规定方向之间的夹角大于或等于第一预设阈值,且所述第二位移在所述规定方向上的投影大于或等于第二预设阈值,确定所述车辆未按照所述规定方向行驶。
由此在车辆到达任一个第一轨迹点之前,所述车辆的行驶方向与规定方向偏离较大,并且已经按照该行驶方向行驶一段距离的情形下,可以确定车辆未按照所述规定方向行驶,从而提升车辆行驶行为检测准确性。
在一些实施例中,响应于所述多个轨迹点中任一个轨迹点相对于其它轨迹点的位移与所述规定方向之间的夹角大于或等于第一预设阈值,且所述位移在所述规定方向上的投影大于或等于第二预设阈值,可以将该轨迹点确定为目标轨迹点。
所述目标轨迹点,可以为车辆行驶轨迹中的轨迹点。由于所述目标轨迹点相对于其它轨迹点的位移与所述规定方向之间的夹角大于或等于第一预设阈值,且所述位移在所述规定方向上的投影大于或等于第二预设阈值,因此可以说明车辆在所述目标轨迹点之前或之后出现过未按照所述规定方向行驶的行为。也即,如果车辆行驶轨迹包括的多个轨迹点中包括前述目标轨迹点则可以说明车辆未按照所述规定方向行驶。
在一些实施例中可以利用所述目标轨迹点表示车辆是否按规定方向行驶的特性,检测所述多个轨迹点中是否包括所述目标轨迹点,并在所述多个轨迹点中包括所述目标轨迹点的情形下,确定所述车辆未按照所述规定方向行驶,从而实现车辆行驶行为的自动检测,提升检测效率与及时性。
在一些实施例中,在针对一个轨迹点相对于其它轨迹点的位移的判断之后,可以响应于所述多个轨迹点中包括所述目标轨迹点,确定所述目标轨迹点包括的所述目标轨迹点的数量是否大于或等于第三预设阈值。响应于所述多个轨迹点中包括所述目标轨迹点的数量大于或等于第三预设阈值,确定所述车辆未按照所述规定方向行驶。
所述第三阈值包括根据业务需求进行设置的阈值。在所述行驶轨迹中包括的所述目标轨迹点的数量大于或等于第三预设阈值时,可以说明所述车辆行驶路径中存在多段未按规定方向行驶的行为,由此可以有助于避免由于诸如图像检测异常等偶然性因素导致的误判断,提升车辆行驶行为检测准确性。
在一些实施例中,当确定车辆在某一轨迹点之前和之后均存在未按规定方向行驶行为的情形下,可以确定该轨迹点为未按规定方向行驶轨迹中的轨迹点,从而排除偶然检测到该轨迹点不存在未按规定方向行驶行为的带来的误判,进而提升车辆行驶检测准确性。
在一些实施例中,当确定车辆在某一轨迹点之前和之后均存在未按规定方向行驶行为的情形下,也可以将该轨迹点确定为目标轨迹点,由此提升目标轨迹点的确定准确性,进而提升车辆行驶检测准确性。
在执行S106时,将所述多个轨迹点依次确定为第一轨迹点,可以根据该第一轨迹点和该第一轨迹点之前的一个或多个第三轨迹点指示的位置信息,确定所述车辆在到达该第一轨迹点之前的一个或多个第二位移,以及根据该第一轨迹点和该第一轨迹点之后的一个或多个第二轨迹点指示的位置信息,确定所述车辆在到达该第一轨迹点之后的一个或多个第一位移。
在执行S108时,可以响应于所述一个或多个第二位移中的任一个第二位移和所述一个或多个第一位移中的任一个第一位移与所述规定方向之间的夹角均大于或等于第一预设阈值,且所述第一位移和所述第二位移在所述规定方向上的投影均大于或等于第二预设阈值,确定所述车辆未按照所述规定方向行驶。
请继续参见图2,轨迹点Q与轨迹点C形成第二位移QC,以及轨迹点C与轨迹点P形成第一位移CP,第二位移QC与第一位移CP与所述规定方向之间的夹角均大于或等于第一预设阈值,且第二位移QC与第一位移CP在所述规定方向上的投影均大于或等于第二预设阈值,则可以确定在轨迹点C之前和之后,所述车辆均发生未按照所述规定方向行驶的行为,此时确定所述车辆未按照所述规定方向行驶可以提升车辆行驶检测准确性。
请继续参见图2,在一些实施例中,也可以将轨迹点C作为目标轨迹点,等到行驶轨迹中的各轨迹点均已被确定过为第一轨迹点,并执行过S106-S108的步骤后,可以统计目标轨迹点的数量,如果该数量大于或等于第三预设阈值,可以确定所述车辆未按照所述规定方向行驶。由此可以提升目标轨迹点的确定准确性,进而提升车辆行驶检测准确性。
图4为本公开示出的一种车辆行驶行为检测流程示意图。如图4所示,在执行S106-S108时,可以从首个轨迹点开始,执行S41,按照轨迹点排序顺序,将多个轨迹 点依次确定为第一轨迹点,并执行S42至S48。
执行S42,按照从后向前的顺序,将所述第一轨迹点之前的轨迹点作为第三轨迹点,并执行S43,判断所述第三轨迹点与所述第一轨迹点形成的一个或多个第二位移中的任一个第二位移与所述规定方向之间的夹角是否大于或等于第一预设阈值,且该第二位移在所述规定方向上的投影是否大于或等于第二预设阈值。
如果前述夹角未大于或等于第一预设阈值和/或前述投影未大于或等于第二预设阈值,则可以执行S44,确定第一轨迹点之前的轨迹点是否均被确定过为第三轨迹点。如果第一轨迹点之前的轨迹点均被确定过为第三轨迹点,则确定该第一轨迹点不是目标轨迹点,并切换至下一个第一轨迹点,继续执行S42-S44。如果第一轨迹点之前的轨迹点存在未被确定过的第三轨迹点,则切换第三轨迹点并执行S43-S44。
如果前述夹角大于或等于第一预设阈值,并且前述投影大于或等于第二预设阈值,则可以执行S45,按照从前向后的顺序,将所述第一轨迹点之后的轨迹点作为第二轨迹点,并执行S46,判断所述第一轨迹点与所述第二轨迹点形成的一个或多个第一位移中的任一个第一位移与所述规定方向之间的夹角是否大于或等于第一预设阈值,且该第一位移在所述规定方向上的投影是否大于或等于第二预设阈值。
如果前述夹角大于或等于第一预设阈值,并且前述投影大于或等于第二预设阈值,则可以执行S47,确定第一轨迹点为目标轨迹点。
如果前述夹角未大于或等于第一预设阈值和/或前述投影未大于或等于第二预设阈值,则可以执行S48,确定第一轨迹点之后的轨迹点是否均被确定过为第二轨迹点。如果第一轨迹点之后的轨迹点均被确定过为第二轨迹点,则确定该第一轨迹点不是目标轨迹点,并切换至下一个第一轨迹点,继续执行S42-S48。如果第一轨迹点之后的轨迹点存在未被确定过的第二轨迹点,则切换至下一个第二轨迹点并执行S46-S48。
等到所述多个轨迹点均已被确定过为第一轨迹点,可以确定目标轨迹点的数量是否大于或等于第三阈值,如果是,可以确定车辆未按规定方向行驶。如果否,则可以确定车辆按照规定方向行驶,并完成针对所述车辆的行驶行为检测。
在一些实施例中,在执行S106之前,还包括:确定所述多个轨迹点中指示所述车辆处于所述车道内的内部轨迹点。在执行S106时,可以根据所述内部轨迹点指示的位置信息,确定所述内部轨迹点相对其它内部轨迹点的位移。一方面,该处理可以减少工作量,提升检测效率,另一方面,可以排除非所述车道内的轨迹点对车辆行驶行为造成的影响,提升行驶行为检测准确性。
在一些实施例中,还可以对所述视频流中的车辆的车轮进行目标检测,得到所述车辆处于每个轨迹点时,各车轮分别对应的位置信息。在实际应用中,可以根据目标检测算法,对从视频流中选取多张图像进行目标检测,得到车辆在图像中轨迹点的位置,并得到包括车轮的检测框。然后可以将各车轮检测框中心点坐标确定为各车轮所处的位置。
在确定内部轨迹点时,针对所述多个轨迹点中的每个轨迹点,可以根据所述车辆处于该轨迹点时各车轮对应的位置信息,确定处于所述车道内的车轮数量是否大于或等于第四预设阈值(经验阈值)。响应于处于所述车道内的车轮数量大于或等于第四预设阈 值,将所述车辆对应的该轨迹点确定为所述车道内的内部轨迹点。
其中,确定车轮是否在车道内的方法可以包括:将4个车轮的坐标与车道的4个顶点的坐标进行比较,如果车轮的横坐标值处于车道的最小横坐标与最大横坐标之间,并且车轮的纵坐标处于车道的最小纵坐标与最大纵坐标之间,则可以确定车辆处于车道内。需要说明的是,本公开不对确定车轮是否在车道内的方法进行特别限定。
根据处于车道内的车轮数量,确定车辆对应轨迹点是否处于车道内,与仅通过轨迹点的位置确定轨迹点是否处于车道内相比,可以较准确地确定内部轨迹点,从而提升车辆行驶行为检测准确性。
在一些实施例中,可以响应于所述车辆未按照所述规定方向行驶,发送告警信息。由此实现即时告警。在一些实施例中,所述设备可以通过无线方式与交警手持终端连接。所述设备在确定某一车辆未按照车道规定方向行驶的情形下,可以生成告警信息,并发送至交警手持终端,进行及时告警。
在一些实施例中,所述告警信息可以包括以下至少一项:采集的视频流中满足预设条件的优选图像;所述优选图像中车辆检测框围成的区域图,例如车辆图像;所述车辆未按照所述规定方向行驶的开始时刻对应的第一图像;所述车辆未按照所述规定方向行驶的结束时刻对应的第二图像;所述车辆的车辆信息。
其中,所述优选图像可以是指视频流中车辆不在图像边缘,车辆清晰度较高并且车辆目标足够大的图像。在一些实施例中,可以利用经过有监督训练的优选图像选取神经网络,从视频流中选取满足前述预设条件的优选图像。
所述区域图,可以是对优选图像进行目标检测得到的车辆检测框所围成的区域图。该区域图可以包括清晰的车辆目标。
所述第一图像,可以包括时刻最早的目标轨迹点对应的图像。该图像对应的采集时刻可以指示所述车辆未按照所述规定方向行驶的开始时刻。
所述第二图像,可以是时刻最晚的目标轨迹点对应的图像。该图像对应的采集时刻可以指示所述车辆未按照所述规定方向行驶的结束时刻。
所述车辆的车辆信息,可以包括车牌号码、车牌颜色、车牌类型、车辆类型、车辆颜色等便于确认车辆的信息。
所述告警信息包括前述多种信息,可以完整地输出车辆未按规定方向行驶的事件,便于人工研判和取证。
在一些实施例中,可以将告警信息中包括的各图像合并为一帧图像进行输出,由此便于直观对车辆未按规定方向行驶的事件进行观察,便于人工研判和取证,降低存储成本。
以下结合车辆逆行检测场景进行实施例说明。
在该场景中,可以在车道位置部署摄像头。所述摄像头可以采集视频流。所述视频流中可以包括多条车道。摄像头可以实时采集视频流并发送至与摄像头连接的监控设备。所述监控设备可以用于进行车辆逆行检测。
所述监控设备中预先维护了各条车道的4个顶点坐标,以及各车道规定的行驶方向。
所述监控设备在接收到视频流后,可以通过对视频流中车辆位置的解析,确定车辆当前行驶的目标车道,以及车辆在视频流中的多个轨迹点。还可以通过对视频流中车辆的车轮的位置解析,得到某一车辆的4个车轮分别在所述多个轨迹点时,4个车轮分别对应的位置点。
然后,所述监控设备可以将所述多个轨迹点分别确定为待判轨迹点,并根据所述目标车道的4个顶点坐标,确定车辆处于所述待判轨迹点对应的位置时,所述目标车道内的车轮数量是否大于或等于3(第四预设阈值),如果是,则可以将该待判轨迹点确定为所述目标车道的内部轨迹点;如果否,则可以确定该待判轨迹点不是所述内部轨迹点。
之后,所述监控设备可以通过执行S41-S48,确定出内部轨迹点中的目标轨迹点并确定目标轨迹点数量是否大于或等于10(第三预设阈值),如果大于或等于第三预设阈值则可以确定车辆逆行。
在确定车辆逆行后,所述监控设备可以从视频流选取优选图像,从优选图像中截取出车辆区域图,确定出车辆开始逆行的第一图像,以及车辆结束逆行的第二图像,并将4个图像融合至一帧融合图像中。所述监控设备还可以从车辆信息数据库中选取出与该车辆对应的车辆颜色、型号等信息,并结合所述融合图像生成告警信息发送至交警手持终端中,以进行目标行为研判。由此,可以实现车辆行驶行为的自动检测,提升检测效率与及时性,并且在发现车辆逆行行为时可以根据多种证据信息及时发出告警,便于及时对逆行行为做出处理。与所述任一实施例相对应的,本公开还提出一种车辆行驶行为检测装置50。
图5为本公开示出的一种车辆行驶行为检测装置的结构示意图。如图5所示,所述检测装置50可以包括:获取模块51,用于获取视频流;其中,所述视频流中包括预设的车道和所述车道的规定方向;检测与跟踪模块52,用于对所述视频流中的车辆进行目标检测与跟踪,得到所述车辆对应的行驶轨迹;所述行驶轨迹包括指示所述车辆所处位置的多个轨迹点;第一确定模块53,用于针对所述多个轨迹点中的每个轨迹点,根据该轨迹点指示的位置信息,确定该轨迹点相对于其它轨迹点的位移;第二确定模块54,用于响应于所述多个轨迹点中的任一个轨迹点相对于其它轨迹点的位移与所述规定方向之间的夹角大于或等于第一预设阈值,且所述位移在所述规定方向上的投影大于或等于第二预设阈值,确定所述车辆未按照所述规定方向行驶。
在一些实施例中,所述装置50还包括:第三确定模块,用于响应于所述多个轨迹点中任一个轨迹点相对于其它轨迹点的位移与所述规定方向之间的夹角大于或等于第一预设阈值,且所述位移在所述规定方向上的投影大于或等于第二预设阈值,将所述任意轨迹点确定为目标轨迹点。
所述第二确定模块54,用于响应于所述目标轨迹点的数量大于或等于第三预设阈值,确定所述车辆未按照所述规定方向行驶。
在一些实施例中,所述第一确定模块53,用于根据该轨迹点和该轨迹点之后的一个或多个第一轨迹点指示的位置信息,确定所述车辆在到达该轨迹点之后的一个或多个第一位移。
所述第二确定模块54,用于响应于所述一个或多个第一位移中的任一个第一位移与所述规定方向之间的夹角大于或等于第一预设阈值,且该第一位移在所述规定方向上的投影均大于或等于第二预设阈值,确定所述车辆未按照所述规定方向行驶。
在一些实施例中,所述第一确定模块53,用于:根据该轨迹点和之前的一个或多个第二轨迹点指示的位置信息,确定所述车辆在到达该轨迹点之前的一个或多个第二位移。
所述第二确定模块54,用于响应于一个或多个第二位移中的任一个第二位移与所述规定方向之间的夹角大于或等于第一预设阈值,且该第二位移在所述规定方向上的投影大于或等于第二预设阈值,确定所述车辆未按照所述规定方向行驶。
在一些实施例中,所述第一确定模块53,用于根据该轨迹点和该轨迹点之前的一个或多个第二轨迹点指示的位置信息,确定所述车辆在到达该第一轨迹点之前的一个或多个第二位移;根据该轨迹点和该轨迹点之后的一个或多个第一轨迹点指示的位置信息,确定所述车辆在到达该轨迹点之后的一个或多个第一位移。
所述第二确定模块54,用于响应于所述一个或多个第二位移中的任一个第二位移和所述一个或多个第一位移中的任一个第一位移与所述规定方向之间的夹角均大于或等于第一预设阈值,且该第二位移和该第一位移在所述规定方向上的投影均大于或等于第二预设阈值,确定所述车辆未按照所述规定方向行驶。
在一些实施例中,所述装置50还包括:第四确定模块,用于确定所述多个轨迹点中指示所述车辆处于所述车道内的内部轨迹点。
所述第一确定模块53,用于根据所述内部轨迹点指示的位置信息,确定所述内部轨迹点相对其它内部轨迹点的位移。
在一些实施例中,所述装置50还包括:检测模块,用于对所述视频流中的所述车辆的车轮进行目标检测,得到所述车辆处于该轨迹点时,所述车辆的各车轮分别对应的位置信息。
所述第四确定模块,用于针对所述多个轨迹点中的每个轨迹点,根据所述车辆处于该轨迹点时的各车轮对应的位置信息,确定处于所述车道内的车轮数量是否大于或等于第四预设阈值;响应于处于所述车道内的所述车轮数量大于或等于第四预设阈值,将所述车辆对应的该轨迹点确定为所述车道内的内部轨迹点。
在一些实施例中,所述装置50还包括:告警模块,用于响应于所述车辆未按照所述规定方向行驶,发送告警信息。
在一些实施例中,所述告警信息包括以下至少一项:所述视频流中满足预设条件的优选图像;所述优选图像中车辆检测框围成的区域图;所述车辆未按照所述规定方向行驶的开始时刻对应的第一图像;所述车辆未按照所述规定方向行驶的结束时刻对应的 第二图像;所述车辆的车辆信息。
在一些实施例中,所述装置50还包括:输出模块,用于将告警信息中包括的各图像合并为一帧图像进行输出。
本公开示出的车辆行驶行为检测装置的实施例可以应用于电子设备上。相应地,本公开公开了一种电子设备,该设备可以包括:处理器;用于存储处理器可执行指令的存储器;其中,所述处理器被配置为调用所述存储器中存储的可执行指令,实现前述任一实施例示出的车辆行驶行为检测方法。
图6为本公开示出的一种电子设备的硬件结构示意图。如图6所示,该电子设备可以包括用于执行指令的处理器601,用于进行网络连接的网络接口602,用于为处理器存储运行数据的内存603,以及用于存储车辆行驶行为检测装置对应指令的非易失性存储器604,其中处理器601、网络接口602、内存603和非易失性存储器604通过内部总线605耦接。
其中,装置的实施例可以通过软件实现,也可以通过硬件或者软硬件结合的方式实现。以软件实现为例,作为一个逻辑意义上的装置,是通过其所在电子设备的处理器将非易失性存储器中对应的计算机程序指令读取到内存中运行形成的。从硬件层面而言,除了图6所示的处理器、内存、网络接口、以及非易失性存储器之外,实施例中装置所在的电子设备通常根据该电子设备的实际功能,还可以包括其他硬件,对此不再赘述。
可以理解的是,为了提升处理速度,装置对应指令也可以直接存储于内存中,在此不作限定。
本公开提出一种计算机可读存储介质,所述存储介质存储有计算机程序,所述计算机程序可以用于使处理器执行前述任一实施例示出的车辆行驶行为检测方法。
本领域技术人员应明白,本公开一个或多个实施例可提供为方法、***或计算机程序产品。因此,本公开一个或多个实施例可采用完全硬件实施例、完全软件实施例或结合软件和硬件方面的实施例的形式。而且,本公开一个或多个实施例可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(可以包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本公开中的“和/或”表示至少具有两者中的其中一个,例如,“A和/或B”可以包括三种方案:A、B、以及“A和B”。
本公开中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于数据处理设备实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
以上对本公开特定实施例进行了描述。其它实施例在所附权利要求书的范围内。在一些情况下,在权利要求书中记载的行为或步骤可以按照不同于实施例中的顺序来执行并且仍然可以实现期望的结果。另外,在附图中描绘的过程不一定要求示出的特定顺序或者连续顺序才能实现期望的结果。在某些实施方式中,多任务处理和并行处理也是可以的或者可能是有利的。
本公开中描述的主题及功能操作的实施例可以在以下中实现:数字电子电路、有形体现的计算机软件或固件、可以包括本公开中公开的结构及其结构性等同物的计算机硬件、或者它们中的一个或多个的组合。本公开中描述的主题的实施例可以实现为一个或多个计算机程序,即编码在有形非暂时性程序载体上以被数据处理装置执行或控制数据处理装置的操作的计算机程序指令中的一个或多个模块。可替代地或附加地,程序指令可以被编码在人工生成的传播信号上,例如机器生成的电、光或电磁信号,该信号被生成以将信息编码并传输到合适的接收机装置以由数据处理装置执行。计算机存储介质可以是机器可读存储设备、机器可读存储基板、随机或串行存取存储器设备、或它们中的一个或多个的组合。
本公开中描述的处理及逻辑流程可以由执行一个或多个计算机程序的一个或多个可编程计算机执行,以通过根据输入数据进行操作并生成输出来执行相应的功能。所述处理及逻辑流程还可以由专用逻辑电路—例如FPGA(现场可编程门阵列)或ASIC(专用集成电路)来执行,并且装置也可以实现为专用逻辑电路。
适合可以用于执行计算机程序的计算机可以包括,例如通用和/或专用微处理器,或任何其他类型的中央处理单元。通常,中央处理单元将从只读存储器和/或随机存取存储器接收指令和数据。计算机的基本组件可以包括可以用于实施或执行指令的中央处理单元以及可以用于存储指令和数据的一个或多个存储器设备。通常,计算机还将可以包括可以用于存储数据的一个或多个大容量存储设备,例如磁盘、磁光盘或光盘等,或者计算机将可操作地与此大容量存储设备耦接以从其接收数据或向其传送数据,抑或两种情况兼而有之。然而,计算机不是必须具有这样的设备。此外,计算机可以嵌入在另一设备中,例如移动电话、个人数字助理(PDA)、移动音频或视频播放器、游戏操纵台、全球定位***(GPS)接收机、或例如通用串行总线(USB)闪存驱动器的便携式存储设备,仅举几例。
适合于存储计算机程序指令和数据的计算机可读介质可以包括所有形式的非易失性存储器、媒介和存储器设备,例如可以包括半导体存储器设备(例如EPROM、EEPROM和闪存设备)、磁盘(例如内部硬盘或可移动盘)、磁光盘以及CD ROM和DVD-ROM盘。处理器和存储器可由专用逻辑电路补充或并入专用逻辑电路中。
虽然本公开包含许多具体实施细节,但是这些不应被解释为限制任何公开的范围或所要求保护的范围,而是主要可以用于描述特定公开的具体实施例的特征。本公开内在多个实施例中描述的某些特征也可以在单个实施例中被组合实施。另一方面,在单个实施例中描述的各种特征也可以在多个实施例中分开实施或以任何合适的子组合来实施。此外,虽然特征可以如所述在某些组合中起作用并且甚至最初如此要求保护,但是来自所要求保护的组合中的一个或多个特征在一些情况下可以从该组合中去除,并且所要求保护的组合可以指向子组合或子组合的变型。
类似地,虽然在附图中以特定顺序描绘了操作,但是这不应被理解为要求这些操作以所示的特定顺序执行或顺次执行、或者要求所有例示的操作被执行,以实现期望的结果。在某些情况下,多任务和并行处理可能是有利的。此外,所述实施例中的各种***模块和组件的分离不应被理解为在所有实施例中均需要这样的分离,并且应当理解, 所描述的程序组件和***通常可以一起集成在单个软件产品中,或者封装成多个软件产品。
由此,主题的特定实施例已被描述。其他实施例在所附权利要求书的范围以内。在某些情况下,权利要求书中记载的动作可以以不同的顺序执行并且仍实现期望的结果。此外,附图中描绘的处理并非必需所示的特定顺序或顺次顺序,以实现期望的结果。在某些实现中,多任务和并行处理可能是有利的。
以上为本公开一个或多个实施例的实施例,并不用以限制本公开一个或多个实施例,凡在本公开一个或多个实施例的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本公开一个或多个实施例保护的范围之内。

Claims (14)

  1. 一种车辆行驶行为检测方法,包括:
    获取视频流;其中,所述视频流中包括预设的车道和所述车道的规定方向;
    对所述视频流中的车辆进行目标检测与跟踪,得到所述车辆对应的行驶轨迹;所述行驶轨迹包括指示所述车辆所处位置的多个轨迹点;
    针对所述多个轨迹点中的每个轨迹点,根据该轨迹点指示的位置信息,确定该轨迹点相对于其它轨迹点的位移;
    响应于所述多个轨迹点中的任一个轨迹点相对于其它轨迹点的位移与所述规定方向之间的夹角大于或等于第一预设阈值,且所述位移在所述规定方向上的投影大于或等于第二预设阈值,确定所述车辆未按照所述规定方向行驶。
  2. 根据权利要求1所述的方法,还包括:
    响应于所述多个轨迹点中任一个轨迹点相对于其它轨迹点的位移与所述规定方向之间的夹角大于或等于所述第一预设阈值,且所述位移在所述规定方向上的投影大于或等于所述第二预设阈值,将该轨迹点确定为目标轨迹点;
    确定所述车辆未按照所述规定方向行驶,包括:
    响应于所述目标轨迹点的数量大于或等于第三预设阈值,确定所述车辆未按照所述规定方向行驶。
  3. 根据权利要求1或2所述的方法,根据该轨迹点指示的位置信息,确定该轨迹点相对所述其它轨迹点的位移,包括:
    根据该轨迹点和该轨迹点之后的一个或多个第一轨迹点指示的位置信息,确定所述车辆在到达该轨迹点之后的一个或多个第一位移;
    响应于所述多个轨迹点中的任一个轨迹点相对于其它轨迹点的位移与所述规定方向之间的夹角大于或等于所述第一预设阈值,且所述位移在所述规定方向上的投影大于或等于所述第二预设阈值,确定所述车辆未按照所述规定方向行驶,包括:
    响应于所述一个或多个第一位移中的任一个第一位移与所述规定方向之间的夹角大于或等于所述第一预设阈值,且该第一位移在所述规定方向上的投影大于或等于所述第二预设阈值,确定所述车辆未按照所述规定方向行驶。
  4. 根据权利要求1或2所述的方法,根据该轨迹点指示的位置信息,确定该轨迹点相对所述其它轨迹点的位移,包括:
    根据该轨迹点和该轨迹点之前的一个或多个第二轨迹点指示的位置信息,确定所述车辆在到达该轨迹点之前的一个或多个第二位移;
    响应于所述多个轨迹点中的任一个轨迹点相对于其它轨迹点的位移与所述规定方向之间的夹角大于或等于所述第一预设阈值,且所述位移在所述规定方向上的投影大于或等于所述第二预设阈值,确定所述车辆未按照所述规定方向行驶,包括:
    响应于所述一个或多个第二位移中的任一个第二位移与所述规定方向之间的夹角大于或等于所述第一预设阈值,且该第二位移在所述规定方向上的投影大于或等于所述第二预设阈值,确定所述车辆未按照所述规定方向行驶。
  5. 根据权利要求1或2所述的方法,根据该轨迹点指示的位置信息,确定该轨迹点相对所述其它轨迹点的位移,包括:
    根据该轨迹点和该轨迹点之前的一个或多个第二轨迹点指示的位置信息,确定所述 车辆在到达该轨迹点之前的一个或多个第二位移;
    根据该轨迹点和该轨迹点之后的一个或多个第一轨迹点指示的位置信息,确定所述车辆在到达该轨迹点之后的一个或多个第一位移;
    响应于所述多个轨迹点中的任一个轨迹点相对于其它轨迹点的位移与所述规定方向之间的夹角大于或等于所述第一预设阈值,且所述位移在所述规定方向上的投影大于或等于所述第二预设阈值,确定所述车辆未按照所述规定方向行驶,包括:
    响应于所述一个或多个第二位移中的任一个第二位移和所述一个或多个第一位移中的任一个第一位移与所述规定方向之间的夹角均大于或等于所述第一预设阈值,且该第二位移和该第一位移在所述规定方向上的投影均大于或等于所述第二预设阈值,确定所述车辆未按照所述规定方向行驶。
  6. 根据权利要求1-5任一所述的方法,还包括:
    确定所述多个轨迹点中指示所述车辆处于所述车道内的内部轨迹点;
    根据该轨迹点指示的位置信息,确定该轨迹点相对所述其它轨迹点的位移,包括:
    根据所述内部轨迹点指示的位置信息,确定所述内部轨迹点相对其它内部轨迹点的位移。
  7. 根据权利要求6所述的方法,还包括:
    对所述视频流中的所述车辆的车轮进行目标检测,得到所述车辆处于该轨迹点时,所述车辆的各车轮分别对应的位置信息;
    确定所述多个轨迹点中指示所述车辆处于所述车道内的内部轨迹点,包括:
    针对所述多个轨迹点中的每个轨迹点,根据所述车辆处于该轨迹点时的各车轮对应的位置信息,确定处于所述车道内的车轮数量是否大于或等于第四预设阈值;
    响应于处于所述车道内的所述车轮数量大于或等于所述第四预设阈值,将所述车辆对应的该轨迹点确定为所述车道内的内部轨迹点。
  8. 根据权利要求1-7任一所述的方法,还包括:
    响应于所述车辆未按照所述规定方向行驶,发送告警信息。
  9. 根据权利要求8所述的方法,所述告警信息包括以下至少一项:
    所述视频流中满足预设条件的优选图像;
    所述优选图像中车辆检测框围成的区域图;
    所述车辆未按照所述规定方向行驶的开始时刻对应的第一图像;
    所述车辆未按照所述规定方向行驶的结束时刻对应的第二图像;
    所述车辆的车辆信息。
  10. 根据权利要求9所述的方法,还包括:
    将所述告警信息中包括的各图像合并为一帧图像进行输出。
  11. 一种车辆行驶行为检测装置,包括:
    获取模块,用于获取视频流;其中,所述视频流中包括预设的车道和所述车道的规定方向;
    检测与跟踪模块,用于对所述视频流中的车辆进行目标检测与跟踪,得到所述车辆对应的行驶轨迹;所述行驶轨迹包括指示所述车辆所处位置的多个轨迹点;
    第一确定模块,用于针对所述多个轨迹点中的每个轨迹点,根据该轨迹点指示的位置信息,确定该轨迹点相对于其它轨迹点的位移;
    第二确定模块,用于响应于所述多个轨迹点中的任一个轨迹点相对于其它轨迹点的位移与所述规定方向之间的夹角大于或等于第一预设阈值,且所述位移在所述规定方向上的投影大于或等于第二预设阈值,确定所述车辆未按照所述规定方向行驶。
  12. 一种电子设备,包括:
    处理器;
    用于存储处理器可执行指令的存储器;
    其中,所述处理器通过运行所述可执行指令以实现如权利要求1-10任一所述的车辆行驶行为检测方法。
  13. 一种计算机可读存储介质,所述存储介质存储有计算机程序,所述计算机程序用于使处理器执行如权利要求1-10任一所述的车辆行驶行为检测方法。
  14. 一种计算机程序产品,包括存储于存储器中的计算机程序,所述计算机程序指令被处理器执行时实现如权利要求1-10中任意一项所述的车辆行驶行为检测方法。
PCT/CN2022/081772 2021-08-17 2022-03-18 一种车辆行驶行为检测方法、装置、设备和存储介质 WO2023019936A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110944033.1A CN113602264B (zh) 2021-08-17 2021-08-17 一种车辆行驶行为检测方法、装置、设备和存储介质
CN202110944033.1 2021-08-17

Publications (1)

Publication Number Publication Date
WO2023019936A1 true WO2023019936A1 (zh) 2023-02-23

Family

ID=78340996

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/081772 WO2023019936A1 (zh) 2021-08-17 2022-03-18 一种车辆行驶行为检测方法、装置、设备和存储介质

Country Status (2)

Country Link
CN (1) CN113602264B (zh)
WO (1) WO2023019936A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116429146A (zh) * 2023-06-13 2023-07-14 跨越速运集团有限公司 一种车辆导航方法、装置、设备及计算机可读存储介质

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113602264B (zh) * 2021-08-17 2023-02-28 北京市商汤科技开发有限公司 一种车辆行驶行为检测方法、装置、设备和存储介质
CN115994324B (zh) * 2023-03-13 2023-07-18 浙江口碑网络技术有限公司 数据处理方法及装置
CN117456481B (zh) * 2023-12-22 2024-05-14 华南师范大学 一种防伪车牌识别方法、***及终端

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109747642A (zh) * 2019-01-04 2019-05-14 北京博宇通达科技有限公司 车辆行驶控制方法及设备
US20210012119A1 (en) * 2018-03-01 2021-01-14 Jaguar Land Rover Limited Methods and apparatus for acquisition and tracking, object classification and terrain inference
CN112530170A (zh) * 2020-12-16 2021-03-19 济南博观智能科技有限公司 一种车辆行驶状态检测方法、装置、电子设备及存储介质
CN112750317A (zh) * 2020-12-21 2021-05-04 深圳市商汤科技有限公司 车辆逆行检测方法、装置、设备及计算机可读存储介质
CN113602264A (zh) * 2021-08-17 2021-11-05 北京市商汤科技开发有限公司 一种车辆行驶行为检测方法、装置、设备和存储介质

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009140008A (ja) * 2007-12-03 2009-06-25 Sumitomo Electric Ind Ltd 危険走行情報提供装置、危険走行判定プログラム及び危険走行判定方法
JP2019532431A (ja) * 2016-10-14 2019-11-07 富士通株式会社 車両の逆行の検出装置、検出方法及び電子機器
JP2020129331A (ja) * 2019-02-12 2020-08-27 アイシン・エィ・ダブリュ株式会社 逆走判定システム、逆走判定方法、及び逆走判定プログラム
CN110634290B (zh) * 2019-09-12 2020-06-09 北京航空航天大学 一种基于自行车轨迹数据的逆行行为识别方法
CN110689734B (zh) * 2019-09-24 2021-12-21 成都通甲优博科技有限责任公司 车辆行驶状况识别方法、装置及电子设备

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20210012119A1 (en) * 2018-03-01 2021-01-14 Jaguar Land Rover Limited Methods and apparatus for acquisition and tracking, object classification and terrain inference
CN109747642A (zh) * 2019-01-04 2019-05-14 北京博宇通达科技有限公司 车辆行驶控制方法及设备
CN112530170A (zh) * 2020-12-16 2021-03-19 济南博观智能科技有限公司 一种车辆行驶状态检测方法、装置、电子设备及存储介质
CN112750317A (zh) * 2020-12-21 2021-05-04 深圳市商汤科技有限公司 车辆逆行检测方法、装置、设备及计算机可读存储介质
CN113602264A (zh) * 2021-08-17 2021-11-05 北京市商汤科技开发有限公司 一种车辆行驶行为检测方法、装置、设备和存储介质

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116429146A (zh) * 2023-06-13 2023-07-14 跨越速运集团有限公司 一种车辆导航方法、装置、设备及计算机可读存储介质
CN116429146B (zh) * 2023-06-13 2023-08-29 跨越速运集团有限公司 一种车辆导航方法、装置、设备及计算机可读存储介质

Also Published As

Publication number Publication date
CN113602264B (zh) 2023-02-28
CN113602264A (zh) 2021-11-05

Similar Documents

Publication Publication Date Title
WO2023019936A1 (zh) 一种车辆行驶行为检测方法、装置、设备和存储介质
US10403138B2 (en) Traffic accident warning method and traffic accident warning apparatus
Naphade et al. The 2018 nvidia ai city challenge
JP7371157B2 (ja) 車両監視方法、装置、電子機器、記憶媒体、コンピュータプログラム、クラウド制御プラットフォームおよび車路連携システム
JP6815262B2 (ja) 交通違反検知装置、システム、交通違反検知方法およびプログラム
US11836985B2 (en) Identifying suspicious entities using autonomous vehicles
CN109345829B (zh) 无人车的监控方法、装置、设备及存储介质
GB2553036A (en) Autonomous police vehicle
WO2015129045A1 (ja) 画像取得システム、端末、画像取得方法および画像取得プログラム
JP7040606B2 (ja) 交通監視装置、交通監視システム、交通監視方法及びプログラム
CN111028529A (zh) 安装在车辆中的车载设备及相关设备与方法
WO2021227586A1 (zh) 交通事故分析方法、装置及设备
CN105355039A (zh) 路况信息处理方法及设备
Orhan et al. Road hazard detection and sharing with multimodal sensor analysis on smartphones
JP2017216575A (ja) 監視装置及び監視システム
CN112543956B (zh) 提供道路拥堵原因的方法和装置
JP7063379B2 (ja) 交通監視装置、交通監視システム、交通監視方法及びプログラム
US20220237919A1 (en) Method, Apparatus, and Computing Device for Lane Recognition
CN103886763A (zh) 一种利用视频跟踪技术实现超速违法行为拍照方法及***
CN113255439B (zh) 一种障碍物识别方法、装置、***、终端及云端
CN110379172A (zh) 交通规则的生成方法及装置、存储介质、电子装置
CN113112813B (zh) 违章停车检测方法及装置
WO2024098992A1 (zh) 倒车检测方法及装置
Bhandari et al. Fullstop: A camera-assisted system for characterizing unsafe bus stopping
CN109003456B (zh) 记录机动车越实线违法行为的方法和***

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22857255

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE