CN112883904A - Method for detecting vehicle illegal parking lane occupation - Google Patents

Method for detecting vehicle illegal parking lane occupation Download PDF

Info

Publication number
CN112883904A
CN112883904A CN202110274011.9A CN202110274011A CN112883904A CN 112883904 A CN112883904 A CN 112883904A CN 202110274011 A CN202110274011 A CN 202110274011A CN 112883904 A CN112883904 A CN 112883904A
Authority
CN
China
Prior art keywords
vehicle
roi
detection
cnt
detected
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
CN202110274011.9A
Other languages
Chinese (zh)
Other versions
CN112883904B (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.)
Zhuhai Raysharp Technology Co ltd
Original Assignee
Zhuhai Raysharp 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 Zhuhai Raysharp Technology Co ltd filed Critical Zhuhai Raysharp Technology Co ltd
Priority to CN202110274011.9A priority Critical patent/CN112883904B/en
Publication of CN112883904A publication Critical patent/CN112883904A/en
Application granted granted Critical
Publication of CN112883904B publication Critical patent/CN112883904B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/50Context or environment of the image
    • G06V20/56Context or environment of the image exterior to a vehicle by using sensors mounted on the vehicle
    • G06V20/588Recognition of the road, e.g. of lane markings; Recognition of the vehicle driving pattern in relation to the road
    • 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
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/25Determination of region of interest [ROI] or a volume of interest [VOI]

Abstract

The invention provides a method for detecting whether a vehicle occupies a lane illegally, which specifically comprises the following steps: obtaining an ROI binary image, obtaining an image to be detected, detecting vehicles, judging whether the vehicles are detected in the ROI area and counting, counting the number of times of the vehicles in the interval time, giving an alarm and the like. According to the method for detecting the illegal parking lane occupation of the vehicle, the vehicle in the video is detected in real time, the deep learning model is adopted to complete vehicle detection, the method is not affected by the external influences of severe weather, illumination conditions, lens shaking, foreign object blocking and the like, the detection accuracy is greatly improved, the real-time performance and the reliability are guaranteed, automatic alarming can be realized, and the intelligent degree is high.

Description

Method for detecting vehicle illegal parking lane occupation
Technical Field
The invention relates to the technical field of road monitoring, in particular to a method for detecting whether a vehicle occupies a lane illegally.
Background
With the development of modern science and technology and the improvement of the living standard of people, automobiles show a rapid growth trend, but the demand of parking places caused by the growth of more and more automobiles is gradually increased, and the phenomenon of illegal parking of the automobiles is frequent due to insufficient parking spaces, so that the illegal parking and road occupation detection of the automobiles becomes increasingly important. The existing vehicle illegal parking detection technology mainly uses a GPS to position the current area of a vehicle, or reads the identity information of the vehicle by using reading equipment arranged in an illegal parking road section or area and an electronic automobile identifier arranged on an automobile windshield to achieve illegal parking detection, or controls the vehicle illegal parking by a form of traffic police supervision and ticket issuing.
The method for monitoring whether the vehicle in the video is in an illegal state by using the monitoring equipment is also a mainstream method, and the methods used in the video monitoring mainly comprise an interframe difference algorithm, an edge detection algorithm, a background difference algorithm, and a feature extraction-based method comprising SIFT, LBP, HOG and other algorithms. The simple image processing method represented by the background difference method has low accuracy and is easily influenced by severe weather, illumination conditions, lens shake, foreign object blocking and the like; although the feature extraction algorithm represented by the SIFT (scale invariant feature transform matching algorithm) is not easily affected by radiation transformation and illumination, the algorithm is complex and consumes a lot of time, so that the real-time performance is poor, and certain misjudgment is easily caused when the feature points cannot be accurately extracted from a smooth edge.
Disclosure of Invention
Aiming at the defects of the prior art, the invention provides a method for detecting the illegal parking lane occupation of the vehicle, which adopts a deep learning model to complete the vehicle detection, greatly improves the detection accuracy, ensures the real-time performance and the reliability, can realize automatic alarm and has high intelligent degree.
In order to realize the technical scheme, the invention provides a method for detecting whether a vehicle occupies a lane illegally, which specifically comprises the following steps:
s1, obtaining an ROI binary image: setting an ROI (region of interest), and calling an Opencv interface simultaneously according to the coordinates of the ROI to obtain a binary image of the ROI;
s2, acquiring an image to be detected: processing the ROI binary image acquired in the step S1 and the current video background image to keep the background image in the ROI unchanged and blacken the background image outside the ROI;
s3, vehicle detection: sending the image obtained in the step S2 into a trained vehicle detection model to obtain the detection coordinates and the score of the vehicle;
s4, judging whether a vehicle is detected in the ROI and counting: judging the detection result obtained in the step S3, if the number of the obtained detection targets is more than 0, indicating that the vehicle is detected, and adding 1 to the cnt _ detect; otherwise, the notation cnt _ nodetect plus 1 indicates that no vehicle is detected in the ROI region;
s5, counting the number of times of vehicles in the interval time as follows: setting a statistical time interval T, carrying out real-time statistics on cnt _ detect and cnt _ detect values in the T time interval, and calculating the proportion of the number of times of vehicles in the total detection number, wherein the formula is ratio _ corr ═ cnt _ detect/(cnt _ detect + cnt _ detect);
s6, sending an alarm: when the ratio _ corr calculated in step S5 is greater than the set threshold, it indicates that the time that the vehicle stays in the ROI exceeds the preset time, and the vehicle is illegal to stop, the ROI sends an alarm.
Preferably, the vehicle detection model trained in step S3 is obtained by the following steps:
s31, model training: firstly, marking a collected vehicle data set; then modifying the FOCUS layer of the network into a common convolution layer and a DW layer based on a Yolov5 framework; then setting a training configuration file, and importing a training sample into a network for training iteration to obtain network layer parameters and a network model;
s32, model prediction: importing a video frame picture for testing based on the trained network model in the step S31 to obtain a network output layer; and then NMS and score filtering are carried out on the network output layer characteristics to obtain a detection coordinate frame and a score of the vehicle.
Preferably, in step S31, in addition to labeling the collected vehicle data set, a part of non-vehicle category pictures may be additionally selected as negative examples to participate in training.
Preferably, the binary image of the ROI region obtained in step S1 is displayed on the same image.
Preferably, the ROI area in step S1 can be selectively set according to requirements in video monitoring.
The method for detecting the illegal parking lane occupation of the vehicle has the advantages that:
1) the method for detecting the illegal parking lane occupation of the vehicle detects the vehicle in the video in real time, adopts the deep learning model to complete vehicle detection, is not influenced by the outside such as severe weather, illumination conditions, lens shake, foreign object blocking and the like, greatly improves the detection accuracy, and simultaneously ensures the real-time performance and the reliability;
2) according to the method for detecting the lane occupation due to the vehicle parking violation, the pixel points outside the ROI in the background image sent to the model detection are blackened through the set ROI, the pixel value in the ROI is unchanged, so that only the ROI is detected during detection, the pertinence is stronger, IOU (input output) filtering on a detection result and the ROI during detection of a whole picture is omitted to judge whether the ROI contains the vehicle, the algorithm is reduced, the detection requirement can be quickly responded, and the detection efficiency is improved;
3) the method for detecting the lane occupation due to the vehicle illegal parking combines deep learning detection with background image detection, can reduce false alarm caused by non-target objects, and meanwhile, removes targets which are detected by the deep learning target detection and move by utilizing foreground information, thereby greatly improving the accuracy of the target information;
4) the method for detecting whether the vehicle occupies the lane illegally judges whether the vehicle occupies the lane or not by counting whether the proportion of the number of times of the vehicle occupying the total detection number of times within the interval time is greater than a set threshold value or not, has simple algorithm and greatly improves the real-time property of judging whether the vehicle occupies the lane illegally;
5) the method for detecting the occupied road due to the illegal vehicle parking has an automatic alarm function, and once the illegal vehicle parking in the ROI is detected, the method can automatically alarm and has high intelligent degree.
Drawings
FIG. 1 is a flow chart of the operation of the present method.
Detailed Description
The technical solutions in the embodiments of the present invention will be described clearly and completely with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments obtained by a person skilled in the art without making any inventive step are within the scope of the present invention.
Example (b): a method for detecting a lane occupation by a vehicle is provided.
Referring to fig. 1, a method for detecting a lane violation of parking of a vehicle specifically includes the following steps:
s1, obtaining an ROI binary image: setting an ROI (region of interest) area (the ROI area represents an interested area, and the ROI area can be selected and set according to requirements in video monitoring), calling an Opencv interface simultaneously according to the coordinates of the ROI area to obtain a binary image of the ROI area, and displaying the obtained binary image of the ROI area on the same image, so that the whole observation is facilitated;
s2, acquiring an image to be detected: processing the ROI binary image acquired in the step S1 and the current video background image to keep the background image in the ROI unchanged, and blacking the background image outside the ROI area, so that when the image obtained by processing is sent to subsequent vehicle model detection, the detection result in the ROI area can be directly obtained, the influence of the external environment on the detected image can be reduced, and the accuracy of the detected target is improved;
s3, vehicle detection: sending the image obtained in the step S2 to a trained vehicle detection model, and obtaining detection coordinates and a score of the vehicle, wherein the trained vehicle detection model is obtained by the following steps:
s31, model training: firstly, marking an acquired vehicle data set, and additionally selecting a part of non-vehicle other class pictures as negative samples to participate in training so as to reduce false alarm; then based on a Yolov5 framework, the FOCUS layer of the network is modified into a common convolutional layer and a DW layer (the DW layer represents a depth separable convolutional layer), so that the network operation speed is increased, and simultaneously, a hardware support layer can calculate; finally, setting a training configuration file, and importing a training sample into a network for training iteration to obtain network layer parameters, namely a network model;
s32, model prediction: after training is finished, importing a video frame picture for testing based on the trained network model in S31 to obtain a network output layer; then NMS (non-maximum suppression) and score filtering are carried out on the network output layer characteristics to obtain a final detection coordinate frame and a score; the vehicle detection is finished through deep learning models such as model training, model prediction and the like, and the external influences such as severe weather, illumination conditions, lens shaking, foreign object blocking and the like are avoided, so that the detection accuracy is greatly improved; in addition, by organically combining the deep learning detection in step S3 with the background image detection in step S2, false alarm caused by non-target objects can be reduced, and the foreground information is also used to remove targets that are moving and are detected by the deep learning target detection, thereby greatly improving the accuracy of the target information.
S4, judging whether a vehicle is detected in the ROI and counting: judging the detection result obtained in the step S3, if the number of the obtained detection targets is more than 0, indicating that the vehicle is detected, and adding 1 to the cnt _ detect; otherwise, the notation cnt _ nodetect plus 1 indicates that no vehicle is detected in the ROI region;
s5, counting the number of times of vehicles in the interval time as follows: setting a statistical time interval T, carrying out real-time statistics on cnt _ detect and cnt _ detect values in the T time interval, and calculating the proportion of the number of times of vehicles in the total detection number, wherein the formula is ratio _ corr ═ cnt _ detect/(cnt _ detect + cnt _ detect); whether the vehicle is parked illegally is judged by counting whether the proportion of the times of the vehicles in the interval time to the total detection times is greater than a set threshold value, the algorithm is simple, and the real-time performance of judging whether the vehicles occupy the road illegally is greatly improved;
s6, sending an alarm: when the ratio _ corr calculated in the step S5 is greater than the set threshold, it indicates that the time that the vehicle stays in the ROI exceeds the preset time, and the vehicle is illegal to stop, the ROI sends an alarm; once the vehicle violation in the ROI is detected, the automatic warning can be realized, and the intelligent degree is high.
The method for detecting the illegal parking lane occupation of the vehicle detects the vehicle in the video in real time, adopts the deep learning model to complete vehicle detection, is not influenced by the outside such as severe weather, illumination conditions, lens shake, foreign object blocking and the like, and greatly improves the detection accuracy rate; in addition, according to the set ROI, the background image sent to the model detection is used for blacking pixel points outside the ROI, and the pixel value in the ROI is unchanged, so that only the ROI is detected during detection, the pertinence is stronger, and the detection reliability is ensured; the method for detecting whether the vehicle occupies the lane illegally judges whether the vehicle occupies the lane or not by counting whether the proportion of the number of times of the vehicle occupying the total detection number of times within the interval time is greater than a set threshold value or not, has simple algorithm and greatly improves the real-time property of judging whether the vehicle occupies the lane illegally; and possess the automatic alarm function, in case detect that there is the vehicle in the ROI area to break and stop, can report an emergency and ask for help or increased vigilance automatically, intelligent degree is high.
The above description is only for the preferred embodiment of the present invention, but the present invention should not be limited to the embodiment and the disclosure of the drawings, and therefore, all equivalent or modifications that do not depart from the spirit of the present invention are intended to fall within the scope of the present invention.

Claims (4)

1. A method for detecting a vehicle illegal parking lane is characterized by comprising the following steps:
s1, obtaining an ROI binary image: setting an ROI (region of interest), and calling an Opencv interface simultaneously according to the coordinates of the ROI to obtain a binary image of the ROI;
s2, acquiring an image to be detected: processing the ROI binary image acquired in the step S1 and the current video background image to keep the background image in the ROI unchanged and blacken the background image outside the ROI;
s3, vehicle detection: sending the image obtained in the step S2 to a trained vehicle detection model to obtain the detection coordinates and the score of the vehicle, specifically including the following steps:
s31, model training: firstly, marking a collected vehicle data set; then modifying the FOCUS layer of the network into a common convolutional layer and a DW layer (the DW layer represents a depth separable convolutional layer) based on a Yolov5 framework; then setting a training configuration file, and importing a training sample into a network for training iteration to obtain network layer parameters and a network model;
s32, model prediction: importing a video frame picture for testing based on the trained network model in the step S31 to obtain a network output layer; the network output layer features are then NMS (non-maximum suppression) and score filtered to obtain the vehicle's detection coordinate frame and score.
S4, judging whether a vehicle is detected in the ROI and counting: judging the detection result obtained in the step S3, if the number of the obtained detection targets is more than 0, indicating that the vehicle is detected, and adding 1 to the cnt _ detect; otherwise, the notation cnt _ nodetect plus 1 indicates that no vehicle is detected in the ROI region;
s5, counting the number of times of vehicles in the interval time as follows: setting a statistical time interval T, carrying out real-time statistics on cnt _ detect and cnt _ detect values in the T time interval, and calculating the proportion of the number of times of vehicles in the total detection number, wherein the formula is ratio _ corr ═ cnt _ detect/(cnt _ detect + cnt _ detect);
s6, sending an alarm: when the ratio _ corr calculated in step S5 is greater than the set threshold, it indicates that the time that the vehicle stays in the ROI exceeds the preset time, and the vehicle is illegal to stop, the ROI sends an alarm.
2. The method as claimed in claim 1, wherein in step S31, in addition to labeling the collected vehicle data set, a part of non-vehicle category pictures can be additionally selected as negative samples to participate in training.
3. The method for detecting a lane crossing violation by a vehicle according to claim 1 or 2, wherein the binary image of the ROI area obtained in step S1 is displayed on the same image.
4. The method for detecting the occupied vehicle parking lane according to claim 1 or 3, wherein the ROI area in step S1 can be selectively set according to requirements in video monitoring.
CN202110274011.9A 2021-03-15 2021-03-15 Method for detecting vehicle illegal parking lane occupation Active CN112883904B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110274011.9A CN112883904B (en) 2021-03-15 2021-03-15 Method for detecting vehicle illegal parking lane occupation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110274011.9A CN112883904B (en) 2021-03-15 2021-03-15 Method for detecting vehicle illegal parking lane occupation

Publications (2)

Publication Number Publication Date
CN112883904A true CN112883904A (en) 2021-06-01
CN112883904B CN112883904B (en) 2021-11-19

Family

ID=76041820

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110274011.9A Active CN112883904B (en) 2021-03-15 2021-03-15 Method for detecting vehicle illegal parking lane occupation

Country Status (1)

Country Link
CN (1) CN112883904B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106127143A (en) * 2016-06-23 2016-11-16 昆明理工大学 A kind of highway parking offense detection method
CN107330373A (en) * 2017-06-02 2017-11-07 重庆大学 A kind of parking offense monitoring system based on video
CN110298307A (en) * 2019-06-27 2019-10-01 浙江工业大学 A kind of exception parking real-time detection method based on deep learning
CN110491132A (en) * 2019-07-11 2019-11-22 平安科技(深圳)有限公司 Vehicle based on video frame picture analyzing, which is disobeyed, stops detection method and device
CN110533923A (en) * 2019-08-29 2019-12-03 北京精英路通科技有限公司 Parking management method, device, computer equipment and storage medium
CN111077517A (en) * 2019-12-09 2020-04-28 武汉光庭信息技术股份有限公司 Vehicle detection tracking method and device
CN111368687A (en) * 2020-02-28 2020-07-03 成都市微泊科技有限公司 Sidewalk vehicle illegal parking detection method based on target detection and semantic segmentation
CN112084957A (en) * 2020-09-11 2020-12-15 广东联通通信建设有限公司 Mobile target retention detection method and system
CN112287762A (en) * 2020-09-27 2021-01-29 青岛邃智信息科技有限公司 Real-time detection method for vehicle illegal parking under community monitoring scene

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106127143A (en) * 2016-06-23 2016-11-16 昆明理工大学 A kind of highway parking offense detection method
CN107330373A (en) * 2017-06-02 2017-11-07 重庆大学 A kind of parking offense monitoring system based on video
CN110298307A (en) * 2019-06-27 2019-10-01 浙江工业大学 A kind of exception parking real-time detection method based on deep learning
CN110491132A (en) * 2019-07-11 2019-11-22 平安科技(深圳)有限公司 Vehicle based on video frame picture analyzing, which is disobeyed, stops detection method and device
CN110533923A (en) * 2019-08-29 2019-12-03 北京精英路通科技有限公司 Parking management method, device, computer equipment and storage medium
CN111077517A (en) * 2019-12-09 2020-04-28 武汉光庭信息技术股份有限公司 Vehicle detection tracking method and device
CN111368687A (en) * 2020-02-28 2020-07-03 成都市微泊科技有限公司 Sidewalk vehicle illegal parking detection method based on target detection and semantic segmentation
CN112084957A (en) * 2020-09-11 2020-12-15 广东联通通信建设有限公司 Mobile target retention detection method and system
CN112287762A (en) * 2020-09-27 2021-01-29 青岛邃智信息科技有限公司 Real-time detection method for vehicle illegal parking under community monitoring scene

Also Published As

Publication number Publication date
CN112883904B (en) 2021-11-19

Similar Documents

Publication Publication Date Title
CN111368687B (en) Sidewalk vehicle illegal parking detection method based on target detection and semantic segmentation
CN110188807B (en) Tunnel pedestrian target detection method based on cascading super-resolution network and improved Faster R-CNN
CN104303193B (en) Target classification based on cluster
CN109033950B (en) Vehicle illegal parking detection method based on multi-feature fusion cascade depth model
CN104952060B (en) A kind of infrared pedestrian's area-of-interest adaptivenon-uniform sampling extracting method
CN110298300B (en) Method for detecting vehicle illegal line pressing
CN111260693B (en) High-altitude parabolic detection method
CN111723773B (en) Method and device for detecting carryover, electronic equipment and readable storage medium
CN112885108B (en) Vehicle change detection method and system on parking space based on deep learning algorithm
US20190332873A1 (en) Device and Method for Object Recognition of an Input Image for a Vehicle
CN115116012A (en) Method and system for detecting parking state of vehicle parking space based on target detection algorithm
CN115376108A (en) Obstacle detection method and device in complex weather
CN116228756B (en) Method and system for detecting bad points of camera in automatic driving
CN111597992B (en) Scene object abnormity identification method based on video monitoring
CN112883904B (en) Method for detecting vehicle illegal parking lane occupation
CN112906471A (en) Traffic signal lamp identification method and device
CN117152949A (en) Traffic event identification method and system based on unmanned aerial vehicle
JP7264428B2 (en) Road sign recognition device and its program
CN112883906B (en) Personnel state analysis method based on target detection
CN116110230A (en) Vehicle lane crossing line identification method and system based on vehicle-mounted camera
CN115761668A (en) Camera stain recognition method and device, vehicle and storage medium
CN115100650A (en) Expressway abnormal scene denoising and identifying method and device based on multiple Gaussian models
CN113793069A (en) Urban waterlogging intelligent identification method of deep residual error network
CN112836619A (en) Embedded vehicle-mounted far infrared pedestrian detection method, system, equipment and storage medium
CN113343926A (en) Driver fatigue detection method based on convolutional neural network

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