CN111652143A - Vehicle detection method and device and computer storage medium - Google Patents

Vehicle detection method and device and computer storage medium Download PDF

Info

Publication number
CN111652143A
CN111652143A CN202010496693.3A CN202010496693A CN111652143A CN 111652143 A CN111652143 A CN 111652143A CN 202010496693 A CN202010496693 A CN 202010496693A CN 111652143 A CN111652143 A CN 111652143A
Authority
CN
China
Prior art keywords
vehicle
frame
detection
parking space
license plate
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
CN202010496693.3A
Other languages
Chinese (zh)
Other versions
CN111652143B (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.)
Zhejiang Dahua Technology Co Ltd
Original Assignee
Zhejiang Dahua 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 Zhejiang Dahua Technology Co Ltd filed Critical Zhejiang Dahua Technology Co Ltd
Priority to CN202010496693.3A priority Critical patent/CN111652143B/en
Publication of CN111652143A publication Critical patent/CN111652143A/en
Application granted granted Critical
Publication of CN111652143B publication Critical patent/CN111652143B/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/58Recognition of moving objects or obstacles, e.g. vehicles or pedestrians; Recognition of traffic objects, e.g. traffic signs, traffic lights or roads
    • G06V20/584Recognition of moving objects or obstacles, e.g. vehicles or pedestrians; Recognition of traffic objects, e.g. traffic signs, traffic lights or roads of vehicle lights or traffic lights
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/24Aligning, centring, orientation detection or correction of the image
    • G06V10/245Aligning, centring, orientation detection or correction of the image by locating a pattern; Special marks for positioning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/60Type of objects
    • G06V20/62Text, e.g. of license plates, overlay texts or captions on TV images
    • G06V20/625License plates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V2201/00Indexing scheme relating to image or video recognition or understanding
    • G06V2201/08Detecting or categorising vehicles

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Image Analysis (AREA)
  • Traffic Control Systems (AREA)

Abstract

The application discloses a vehicle detection method, a device and a computer storage medium, wherein the vehicle detection method comprises the following steps: acquiring continuous multiframe parking space images; obtaining a vehicle frame in the parking space image through a target detection model; acquiring a tail lamp detection frame from the vehicle frame by adopting a tail lamp detection algorithm, and calculating a tail lamp zone bit based on the tail lamp detection frame; dividing an effective detection area in the vehicle frame according to the state value of the tail lamp zone bit; the license plate frame is positioned within an active detection area of the vehicle frame. By the method, the vehicle frame is subjected to self-adaptive cutting through the state of the tail lamp zone bit, the effective area of license plate detection is determined, the license plate detection area can be effectively reduced, the calculated amount is reduced, and the vehicle positioning efficiency is improved.

Description

Vehicle detection method and device and computer storage medium
Technical Field
The present application relates to the field of image recognition technologies, and in particular, to a vehicle detection method and apparatus, and a computer storage medium.
Background
With the successful application of an Intelligent Transportation System (ITS) in an intelligent public security traffic control system, accurate vehicle violation snapshot plays an extremely important role in standardizing traffic safety driving and building a smart city; the monitoring of the state of the roadside parked vehicles serves as an important component of the ITS, and the method for quickly and accurately positioning the effective area of the license plate and estimating the vehicle posture becomes a key measurement standard of the ITS intellectualization level.
In the method in the prior art, the whole image is used as data input, the preprocessing complexity is high, and the real-time requirement is difficult to meet.
Disclosure of Invention
The application provides a vehicle detection method, a vehicle detection device and a computer storage medium, which aim to solve the problems that in the prior art, the complexity of image processing is high, and the real-time requirement is difficult to meet.
In order to solve the technical problem, the application adopts a technical scheme that: provided is a vehicle detection method including:
acquiring continuous multiframe parking space images;
acquiring a vehicle frame in the parking space image through a target detection model;
acquiring a tail light detection frame from the vehicle frame by adopting a tail light detection algorithm, and calculating a tail light zone bit based on the tail light detection frame;
dividing an effective detection area in the vehicle frame according to the state value of the tail lamp zone bit;
locating a license plate frame within an active detection area of the vehicle frame.
Wherein the step of obtaining the vehicle frame in the parking space image through the target detection model includes:
obtaining a vehicle frame and a corresponding confidence coefficient in the parking space image through the target detection model;
comparing the confidence of the vehicle frame of the parking space images of the continuous frames with a confidence threshold;
and taking the first frame parking space image with the confidence coefficient larger than the confidence coefficient threshold value as a starting frame.
After the step of taking the first parking space image with the confidence coefficient greater than the confidence coefficient threshold value as the starting frame, the vehicle detection method further includes:
acquiring the coordinates of the center points of the vehicle frames in the parking space images of the initial frame and the subsequent frame;
calculating the Euclidean distance of the coordinates of the center points of the vehicle frames in every two parking space images;
and if the Euclidean distances are all smaller than the distance threshold value, determining that the vehicle is in a stable state.
Wherein the step of calculating the tail light flag based on the tail light detection box includes:
setting the tail light flag to 0 when the tail light detection frame does not exist in the parking space image;
setting the tail light flag to 1 when one of the tail light detection frames exists in the parking space image;
when two tail light detection frames exist in the parking space image and the area ratio of the two tail light detection frames is smaller than a ratio threshold value, setting the tail light zone to be 0;
and when two tail light detection frames exist in the parking space image and the area ratio of the two tail light detection frames is larger than or equal to the ratio threshold value, setting the tail light zone to be 1.
Wherein after the step of calculating the tail light flag based on the tail light detection frame, the vehicle detection method further includes:
taking the parking space image with the highest confidence level in all the parking space images as a final parking space image;
acquiring tail lamp zone bits of all parking space images for accumulation processing;
when the accumulated processing result is larger than half of the number of the images of all parking spaces, setting the mark position of the tail lamp as 1 finally;
when the accumulation processing result is less than or equal to half of the number of all parking space images, the final tail lamp flag bit is set to 0.
Wherein the step of locating the license plate frame within the active detection area of the vehicle frame comprises:
setting a lower half area of a vehicle frame of the final parking space image as the effective detection area when the final tail lamp flag bit is 0;
setting an area of a vehicle frame of the final parking space image including the tail light detection frame as the valid detection area when the final tail light flag bit is 1;
and detecting and positioning the license plate frame in the effective detection area by adopting a YOLO deep learning detection algorithm, and acquiring the width and the height of the license plate frame.
After the step of locating the license plate frame within the effective detection area of the vehicle frame, the vehicle detection method further includes:
and calculating the pose information of the vehicle according to the license plate frame and the calibrated license plate width-to-height ratio.
Wherein the pose information comprises an offset angle;
the step of calculating the pose information of the vehicle according to the license plate frame and the calibrated license plate width-to-height ratio comprises the following steps:
calculating the width-height ratio of the license plate frame according to the width and the height of the license plate frame;
and acquiring the deviation angle of the vehicle according to the width-height ratio of the license plate frame and the calibrated license plate width-height ratio.
The step of calculating the pose information of the vehicle according to the license plate frame and the calibrated license plate width-to-height ratio comprises the following steps:
and if the tail light detection frame cannot be acquired from the vehicle frame, judging that the vehicle is parked in a back direction.
In order to solve the above technical problem, another technical solution adopted by the present application is: a vehicle detection device is provided, the vehicle detection device comprising a processor and a memory; the memory has stored therein a computer program for execution by the processor to implement the steps of the vehicle detection method as described above.
In order to solve the above technical problem, another technical solution adopted by the present application is: there is provided a computer storage medium, wherein the computer storage medium stores a computer program which, when executed, implements the steps of the vehicle detection method described above.
Different from the prior art, the beneficial effects of this application lie in: the vehicle detection device acquires continuous multiframe parking space images; obtaining a vehicle frame in the parking space image through a target detection model; acquiring a tail lamp detection frame from the vehicle frame by adopting a tail lamp detection algorithm, and calculating a tail lamp zone bit based on the tail lamp detection frame; dividing an effective detection area in the vehicle frame according to the state value of the tail lamp zone bit; the license plate frame is positioned within an active detection area of the vehicle frame. By the method, the vehicle frame is subjected to self-adaptive cutting through the state of the tail lamp zone bit, the effective area of license plate detection is determined, the license plate detection area can be effectively reduced, the calculated amount is reduced, and the vehicle positioning efficiency is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic flow chart diagram illustrating one embodiment of a vehicle detection method provided herein;
FIG. 2 is a schematic diagram of a vehicle frame divided up and down to obtain effective detection areas;
FIG. 3 is a schematic diagram of a vehicle frame left-right segmentation to obtain effective detection areas;
FIG. 4 is a schematic flow chart diagram illustrating another embodiment of a vehicle detection method provided herein;
FIG. 5 is a schematic structural diagram of an embodiment of a vehicle detection device provided by the present application;
FIG. 6 is a schematic structural diagram of an embodiment of a computer storage medium provided in the present application.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the 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, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In order to solve the problems that the image processing complexity is high and the real-time requirement is difficult to meet in the prior art, the vehicle detection method is provided. Referring to fig. 1, fig. 1 is a schematic flow chart of an embodiment of a vehicle detection method provided in the present application.
The vehicle detection method is applied to a vehicle detection device, wherein the vehicle detection device can be a server, a terminal device and a system formed by the server and the terminal device in a matched mode. Accordingly, each part, such as each unit, sub-unit, module, and sub-module, included in the vehicle detection apparatus may be all disposed in the server, may be all disposed in the terminal device, and may be disposed in the server and the terminal device, respectively.
Further, the server may be hardware or software. When the server is hardware, it may be implemented as a distributed server cluster formed by multiple servers, or may be implemented as a single server. When the server is software, it may be implemented as a plurality of software or software modules, for example, software or software modules for providing distributed servers, or as a single software or software module, and is not limited herein.
As shown in fig. 1, the vehicle detection method of the present embodiment specifically includes the following steps:
s101: and acquiring continuous multiframe parking space images.
Wherein, two stability conditions of the side bearing scene: (1) the roadside side cameras have the same installation standard, and the height and the inclination angle of the cameras are fixed; (2) the appearance size standards of the domestic license plates are unified, and the width-to-height ratio R _ calibration of the license plates in the side calibration scene is a calibration constant.
In this regard, the vehicle detection device needs to calibrate the license plate in a calibration scene, and the calibration process specifically includes: the method comprises the steps of firstly, fixedly installing a camera at a position corresponding to the side direction of a road, then, forwardly parking a vehicle in a roadside side position area for license plate calibration, reversely parking the vehicle in the roadside side position area for license plate calibration, and finally, calculating the width-height ratio R _ calibration of a calibrated license plate according to forward images of a head and a tail of the vehicle of the camera under the side position scene, wherein the width-height ratio R _ card of the head license plate and the width-height ratio R _ card of the tail license plate are specifically included.
After the license plate calibration is completed, the vehicle detection method collects continuous multiframe parking space images through a camera.
S102: and acquiring a vehicle frame in the parking space image through the target detection model.
The vehicle detection device detects and positions the vehicle in the parking space image through the target detection model so as to obtain a vehicle frame of the vehicle in the parking space image, specifically, coordinates and confidence of the vehicle frame in the parking space image.
Specifically, the vehicle detection device may set the CNN convolutional neural network parameters to train the training set data through a deep learning-based YOLOV3 target detection training method, so as to obtain the target detection model used in this embodiment.
S103: and acquiring a tail lamp detection frame from the vehicle frame by adopting a tail lamp detection algorithm, and calculating a tail lamp zone bit based on the tail lamp detection frame.
The vehicle detection device adopts a tail lamp detection algorithm to carry out positioning detection on the side direction vehicle in a stable state, and obtains a tail lamp detection frame in a vehicle frame. Further, the vehicle detection device calculates the tail lamp flag based on the number and mutual positional relationship of the tail lamp detection frames.
Specifically, the vehicle detection apparatus establishes a TailLight _ Flag and OD _ Score queue, and stores the TailLight _ Flag and the car frame confidence OD _ Score of the current frame until the end of accumulating N frames. In the embodiment, N frames are set to be 5-8 frames, the number of frames is too large, time consumption of algorithm processing is increased, the number of frames is too small, and accidental abnormal results of the vehicle frame cannot be avoided.
The tail light Flag tailight _ Flag state value output is related to the tail light detection result, i.e. the number and the mutual position relationship of the tail light detection frames. For example, when the area ratio U > of only 1 or two Tail light detection boxes is Threshold _ Tail, the Tail light Flag tailight _ Flag state value is output as 1; when the number of the tail lamp detection frames is 0 or the area ratio of the two detection frames is 0< U < Threshold _ tail, the state value output of the tail lamp Flag bit TailLight _ Flag is 1. The representation format is as follows:
Figure BDA0002523151380000061
u is the area ratio of two tail lamp detection frames, Threshold _ tail is the ratio Threshold value of setting, generally is 4 ~ 6, and BBox is the number of tail lamp detection frame.
It should be noted that the area ratio U of the tail light detection frame is calculated as follows: if the area of the larger one of the two tail light detection frames is S0 and the area of the other one is S1, the area ratio U of the two tail light detection frames is S0/S1.
S104: and dividing an effective detection area in the vehicle frame according to the state value of the tail lamp zone bit.
In step 103, the vehicle detection apparatus further performs a summation operation on the TailLight Flag state values in the TailLight Flag queue to obtain a TailLight Flag total Sum _ Tail. When Sum _ Tail > N/2, setting the final Tail lamp mark bit to 1; when Sum _ Tail < ═ N/2, the final Tail lamp flag bit is set to 0.
Further, the vehicle detection device takes the parking space image with the highest confidence OD _ Score of the vehicle frames in the queue as the final parking space image, and takes the vehicle frame therein as the final vehicle frame. Furthermore, the vehicle detection device calculates the effective detection area in the final vehicle frame through the final parking space image and the comprehensive multi-frame tail lamp mark bit calculation result under the stable state of the vehicle, and the stability of the target state is ensured. And the vehicle detection device performs segmentation processing on the final vehicle frame according to the state value of the final tail lamp zone bit, and positions an effective detection area for license plate detection.
Specifically, when the final tail lamp mark position is 0, the vehicle detection device performs vertical segmentation processing on the final vehicle frame, and uses the lower half portion of the final vehicle frame as an effective detection area for license plate detection, specifically refer to fig. 2; when the final tail light mark position is 1, the vehicle detection device performs left-right segmentation processing on the final vehicle frame, and selects a vehicle frame segmentation portion including the tail light detection frame as an effective detection area for license plate detection by combining the position of the tail light detection frame, as shown in fig. 3.
S105: the license plate frame is positioned within an active detection area of the vehicle frame.
The vehicle detection device adopts a YOLO deep learning detection algorithm to detect and position the license plate in the license plate frame effective detection area obtained by segmentation in the step 104, so that the license plate detection area can be effectively reduced, and the calculated amount is reduced.
Specifically, the vehicle detection device outputs license plate location information (x, y, w, h), where (x, y) is a license plate detection frame center point coordinate, w is a license plate detection frame width, and h is a license plate detection frame height.
In some possible embodiments, the vehicle detection device may further calculate the pose information of the vehicle according to the vehicle frame and the calibrated license plate aspect ratio.
Specifically, the vehicle detection device detects the aspect ratio K of the frame according to the license platepAnd obtaining the offset angle theta of the target vehicle according to the proportional relation between the target vehicle and the aspect ratio R _ calibrated of the scene calibration license plate, wherein the specific calculation formula is as follows:
Kp=w/h
Figure BDA0002523151380000071
further, the vehicle detection device may also discriminate the parking direction of the vehicle with respect to the camera from the detection result of the tail lamp. When the tail lamp detection frame exists in the vehicle frame, the vehicle detection device judges that the vehicle is parked in the forward direction; when the tail lamp detection frame is not present in the vehicle frame, the vehicle detection device determines that the vehicle is parked in a rear direction.
Finally, the vehicle detection device outputs the pose information of the vehicle according to the deviation angle and the parking direction of the vehicle.
In this embodiment, the vehicle detection device acquires parking space images of consecutive multiple frames; obtaining a vehicle frame in the parking space image through a target detection model; acquiring a tail lamp detection frame from the vehicle frame by adopting a tail lamp detection algorithm, and calculating a tail lamp zone bit based on the tail lamp detection frame; dividing an effective detection area in the vehicle frame according to the state value of the tail lamp zone bit; the license plate frame is positioned in the effective detection area of the vehicle frame, the vehicle frame is subjected to self-adaptive cutting through the state of the tail lamp zone bit, the effective area of license plate detection is determined, the license plate detection area can be effectively reduced, the calculated amount is reduced, and the vehicle positioning efficiency is improved.
On the basis of the above vehicle detection method embodiment, the present application also provides another specific vehicle detection method, please refer to fig. 4 specifically, and fig. 4 is a schematic flow diagram of another embodiment of the vehicle detection method provided by the present application.
As shown in fig. 4, the vehicle detection method of the present embodiment specifically includes the following steps:
s201: and acquiring continuous multiframe parking space images.
S202: and obtaining the vehicle frame and the corresponding confidence coefficient in the parking space image through the target detection model.
The confidence coefficient is an index for measuring the coordinate quality of the vehicle frame output by the target detection model, and the higher the confidence coefficient is, the more accurate the corresponding vehicle frame is. When the target detection model outputs the vehicle frame, the corresponding confidence coefficient is output at the same time, so that the optimal initial frame can be selected subsequently.
S203: and comparing the confidence of the vehicle frame of the parking space images of the continuous frames with a confidence threshold value.
S204: and taking the first frame parking space image with the confidence coefficient larger than the confidence coefficient threshold value as a starting frame.
The vehicle detection device compares the confidence coefficient of the vehicle frame of the parking space image with a confidence coefficient threshold value according to the acquisition sequence of the parking space image until the parking space image where the vehicle frame with the confidence coefficient larger than the set confidence coefficient threshold value is located is acquired, and the parking space image is used as the initial frame parking space image of the vehicle detection method.
Specifically, in the embodiment, the parking space image where the vehicle frame with the confidence coefficient of the first frame greater than the set confidence coefficient threshold is located is used as the initial frame parking space image of the vehicle detection method, so that the detection result of the vehicle frame with unreliable initial state can be effectively filtered, and the stability of the subsequently detected vehicle is ensured.
S205: and acquiring the coordinates of the center points of the vehicle frames in the parking space images of the initial frame and the subsequent frame.
The vehicle detection device further acquires coordinates of a center point of the vehicle frame in the parking space images of the initial frame and the subsequent frame according to the vehicle frame output by the target detection model.
Further, the vehicle detection device can set the inter-frame step length as a delta step frame, and only needs to acquire the coordinates of the center point of the vehicle frame in the parking space image between the initial frame and the delta step frame.
S206: and calculating the Euclidean distance of the coordinates of the center points of the vehicle frames in every two parking space images.
Wherein the vehicle detecting device sets the Euclidean distance between the coordinates of the center points of the vehicle frames from the start frame to the △ step frame to △ S, and assumes that the coordinates of the center points of the vehicle frames in the start frame are C _ start (X)s,Ys) The coordinate of the center point of the vehicle frame in the termination frame is C _ end (X)e,Ye) Then, the calculation formula of the euclidean distance displacement is as follows:
Figure BDA0002523151380000091
s207: and if the Euclidean distances are smaller than the distance threshold value, determining that the vehicle is in a stable state.
When the Euclidean distance from the starting frame to the central point of the vehicle frame of the ending frame is smaller than a set distance threshold, the vehicle detection device judges that the vehicle is in a stable state, and the pose information of the vehicle can be further positioned.
In order to implement the vehicle detection method of the foregoing embodiment, the present application further provides a vehicle detection device, and specifically refer to fig. 5, where fig. 5 is a schematic structural diagram of an embodiment of the vehicle detection device provided in the present application.
As shown in fig. 5, the vehicle detection apparatus 500 of the present embodiment includes a processor 51, a memory 52, an input-output device 53, and a bus 54.
The processor 51, the memory 52, and the input/output device 53 are respectively connected to the bus 54, the memory 52 stores a computer program, and the processor 51 is configured to execute the computer program to implement the vehicle detection method according to the above-described embodiment.
In the present embodiment, the processor 51 may also be referred to as a CPU (Central Processing Unit). The processor 51 may be an integrated circuit chip having signal processing capabilities. The processor 51 may also be a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components. The processor 51 may also be a GPU (Graphics Processing Unit), which is also called a display core, a visual processor, and a display chip, and is a microprocessor specially used for image operation on a personal computer, a workstation, a game machine, and some mobile devices (such as a tablet computer, a smart phone, etc.). The GPU is used for converting and driving display information required by a computer system, providing a line scanning signal for a display and controlling the display of the display correctly, is an important element for connecting the display and a personal computer mainboard, and is also one of important devices for man-machine conversation. The display card is an important component in the computer host, takes charge of outputting display graphics, and is very important for people engaged in professional graphic design. A general purpose processor may be a microprocessor or the processor 51 may be any conventional processor or the like.
The present application also provides a computer storage medium, as shown in fig. 6, the computer storage medium 600 is used for storing a computer program 61, and the computer program 61 is used for implementing the method as described in the embodiment of the vehicle detection method of the present application when being executed by the processor.
The method involved in the embodiment of the vehicle detection method of the present application, when implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a device, such as a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) or a processor (processor) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only an embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes performed by the present specification and drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (11)

1. A vehicle detection method, characterized by comprising:
acquiring continuous multiframe parking space images;
acquiring a vehicle frame in the parking space image through a target detection model;
acquiring a tail light detection frame from the vehicle frame by adopting a tail light detection algorithm, and calculating a tail light zone bit based on the tail light detection frame;
dividing an effective detection area in the vehicle frame according to the state value of the tail lamp zone bit;
locating a license plate frame within an active detection area of the vehicle frame.
2. The vehicle detecting method according to claim 1,
the step of obtaining the vehicle frame in the parking space image through the target detection model includes:
obtaining a vehicle frame and a corresponding confidence coefficient in the parking space image through the target detection model;
comparing the confidence of the vehicle frame of the parking space images of the continuous frames with a confidence threshold;
and taking the first frame parking space image with the confidence coefficient larger than the confidence coefficient threshold value as a starting frame.
3. The vehicle detecting method according to claim 2,
after the step of taking the first parking space image with the confidence coefficient greater than the confidence coefficient threshold value as the starting frame, the vehicle detection method further includes:
acquiring the coordinates of the center points of the vehicle frames in the parking space images of the initial frame and the subsequent frame;
calculating the Euclidean distance of the coordinates of the center points of the vehicle frames in every two parking space images;
and if the Euclidean distances are all smaller than the distance threshold value, determining that the vehicle is in a stable state.
4. The vehicle detecting method according to claim 2,
the step of calculating the tail light flag based on the tail light detection frame includes:
setting the tail light flag to 0 when the tail light detection frame does not exist in the parking space image;
setting the tail light flag to 1 when one of the tail light detection frames exists in the parking space image;
when two tail light detection frames exist in the parking space image and the area ratio of the two tail light detection frames is smaller than a ratio threshold value, setting the tail light zone to be 0;
and when two tail light detection frames exist in the parking space image and the area ratio of the two tail light detection frames is larger than or equal to the ratio threshold value, setting the tail light zone to be 1.
5. The vehicle detecting method according to claim 4,
after the step of calculating the tail light flag based on the tail light detection frame, the vehicle detection method further includes:
taking the parking space image with the highest confidence level in all the parking space images as a final parking space image;
acquiring tail lamp zone bits of all parking space images for accumulation processing;
when the accumulated processing result is larger than half of the number of the images of all parking spaces, setting the mark position of the tail lamp as 1 finally;
when the accumulation processing result is less than or equal to half of the number of all parking space images, the final tail lamp flag bit is set to 0.
6. The vehicle detecting method according to claim 5,
the step of locating a license plate frame within an active detection area of the vehicle frame includes:
setting a lower half area of a vehicle frame of the final parking space image as the effective detection area when the final tail lamp flag bit is 0;
setting an area of a vehicle frame of the final parking space image including the tail light detection frame as the valid detection area when the final tail light flag bit is 1;
and detecting and positioning the license plate frame in the effective detection area by adopting a YOLO deep learning detection algorithm, and acquiring the width and the height of the license plate frame.
7. The vehicle detection method of claim 1, wherein after the step of locating a license plate frame within an effective detection area of the vehicle frame, the vehicle detection method further comprises:
and calculating the pose information of the vehicle according to the license plate frame and the calibrated license plate width-to-height ratio.
8. The vehicle detecting method according to claim 7,
the pose information comprises an offset angle;
the step of calculating the pose information of the vehicle according to the license plate frame and the calibrated license plate width-to-height ratio comprises the following steps:
calculating the width-height ratio of the license plate frame according to the width and the height of the license plate frame;
and acquiring the deviation angle of the vehicle according to the width-height ratio of the license plate frame and the calibrated license plate width-height ratio.
9. The vehicle detecting method according to claim 7,
the step of calculating the pose information of the vehicle according to the license plate frame and the calibrated license plate width-to-height ratio comprises the following steps:
and if the tail light detection frame cannot be acquired from the vehicle frame, judging that the vehicle is parked in a back direction.
10. A vehicle detection device, comprising a processor and a memory; the memory stores a computer program, and the processor is used for executing the computer program to realize the steps of the vehicle detection method according to any one of claims 1-9.
11. A computer storage medium storing a computer program which, when executed, performs the steps of the vehicle detection method according to any one of claims 1 to 9.
CN202010496693.3A 2020-06-03 2020-06-03 Vehicle detection method and device and computer storage medium Active CN111652143B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010496693.3A CN111652143B (en) 2020-06-03 2020-06-03 Vehicle detection method and device and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010496693.3A CN111652143B (en) 2020-06-03 2020-06-03 Vehicle detection method and device and computer storage medium

Publications (2)

Publication Number Publication Date
CN111652143A true CN111652143A (en) 2020-09-11
CN111652143B CN111652143B (en) 2023-09-29

Family

ID=72348899

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010496693.3A Active CN111652143B (en) 2020-06-03 2020-06-03 Vehicle detection method and device and computer storage medium

Country Status (1)

Country Link
CN (1) CN111652143B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115830881A (en) * 2023-02-20 2023-03-21 常州海图信息科技股份有限公司 Parking detection method and device

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6553131B1 (en) * 1999-09-15 2003-04-22 Siemens Corporate Research, Inc. License plate recognition with an intelligent camera
US20070285809A1 (en) * 2005-02-03 2007-12-13 Fujitsu Limited Apparatus, method and computer product for generating vehicle image
JP2008040519A (en) * 2006-08-01 2008-02-21 Hitachi Information & Control Solutions Ltd Portable type illegally parked vehicle photographing device
US20120155712A1 (en) * 2010-12-17 2012-06-21 Xerox Corporation Method for automatic license plate recognition using adaptive feature set
US20130266190A1 (en) * 2012-04-06 2013-10-10 Xerox Corporation System and method for street-parking-vehicle identification through license plate capturing
JP2014126887A (en) * 2012-12-25 2014-07-07 Panasonic Corp License plate determination device
CN105389991A (en) * 2015-12-03 2016-03-09 杭州中威电子股份有限公司 Self-adaptive snapshot method for behavior of running red light
CN106295528A (en) * 2016-08-01 2017-01-04 长安大学 A kind of vehicle checking method based on multi-part spatial relation GMM modeling
CN107679531A (en) * 2017-06-23 2018-02-09 平安科技(深圳)有限公司 Licence plate recognition method, device, equipment and storage medium based on deep learning
CN108021856A (en) * 2016-10-31 2018-05-11 比亚迪股份有限公司 Light for vehicle recognition methods, device and vehicle
KR101875786B1 (en) * 2017-05-26 2018-07-06 (주)베라시스 Method for identifying vehicle using back light region in road image
US20180300578A1 (en) * 2014-06-27 2018-10-18 Blinker, Inc. Method and apparatus for identifying vehicle information from an image
KR101911239B1 (en) * 2018-05-23 2018-10-25 주식회사 에스오넷 The channel extension operation system for detecting illegally parked vehicles
WO2019095588A1 (en) * 2017-11-16 2019-05-23 智慧互通科技有限公司 Roadside parking management method, device and system based on multiple cameras
WO2020082777A1 (en) * 2018-10-25 2020-04-30 广州小鹏汽车科技有限公司 Parking space detection method and apparatus

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6553131B1 (en) * 1999-09-15 2003-04-22 Siemens Corporate Research, Inc. License plate recognition with an intelligent camera
US20070285809A1 (en) * 2005-02-03 2007-12-13 Fujitsu Limited Apparatus, method and computer product for generating vehicle image
JP2008040519A (en) * 2006-08-01 2008-02-21 Hitachi Information & Control Solutions Ltd Portable type illegally parked vehicle photographing device
US20120155712A1 (en) * 2010-12-17 2012-06-21 Xerox Corporation Method for automatic license plate recognition using adaptive feature set
US20130266190A1 (en) * 2012-04-06 2013-10-10 Xerox Corporation System and method for street-parking-vehicle identification through license plate capturing
JP2014126887A (en) * 2012-12-25 2014-07-07 Panasonic Corp License plate determination device
US20180300578A1 (en) * 2014-06-27 2018-10-18 Blinker, Inc. Method and apparatus for identifying vehicle information from an image
CN105389991A (en) * 2015-12-03 2016-03-09 杭州中威电子股份有限公司 Self-adaptive snapshot method for behavior of running red light
CN106295528A (en) * 2016-08-01 2017-01-04 长安大学 A kind of vehicle checking method based on multi-part spatial relation GMM modeling
CN108021856A (en) * 2016-10-31 2018-05-11 比亚迪股份有限公司 Light for vehicle recognition methods, device and vehicle
KR101875786B1 (en) * 2017-05-26 2018-07-06 (주)베라시스 Method for identifying vehicle using back light region in road image
CN107679531A (en) * 2017-06-23 2018-02-09 平安科技(深圳)有限公司 Licence plate recognition method, device, equipment and storage medium based on deep learning
WO2019095588A1 (en) * 2017-11-16 2019-05-23 智慧互通科技有限公司 Roadside parking management method, device and system based on multiple cameras
KR101911239B1 (en) * 2018-05-23 2018-10-25 주식회사 에스오넷 The channel extension operation system for detecting illegally parked vehicles
WO2020082777A1 (en) * 2018-10-25 2020-04-30 广州小鹏汽车科技有限公司 Parking space detection method and apparatus

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
宋俊芳;宋翔宇;郭晓军;王卫星;: "构建多部件关系概率模型的车辆检测方法", no. 03 *
张晶;高彦彦;史源平;: "基于YUV空间和边缘能量的车牌检测方法", no. 3 *
王枚;潘国华;王国宏;: "一种实用的夜间车牌目标定位方法", no. 24 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115830881A (en) * 2023-02-20 2023-03-21 常州海图信息科技股份有限公司 Parking detection method and device

Also Published As

Publication number Publication date
CN111652143B (en) 2023-09-29

Similar Documents

Publication Publication Date Title
CN111383460B (en) Vehicle state discrimination method and device and computer storage medium
EP3620981B1 (en) Object detection method, device, apparatus and computer-readable storage medium
CN107392139B (en) Lane line detection method based on Hough transform and terminal equipment
CN110443178A (en) A kind of monitoring system and its method of vehicle violation parking
CN111382722B (en) License plate image optimization method, image processing device and device with storage function
CN110667474B (en) General obstacle detection method and device and automatic driving system
CN115249355A (en) Object association method, device and computer-readable storage medium
CN111652143A (en) Vehicle detection method and device and computer storage medium
CN114550142A (en) Parking space detection method based on fusion of 4D millimeter wave radar and image recognition
CN113850752A (en) Vehicle overload detection method, device and storage medium
CN111931745B (en) Vehicle detection method and device, electronic equipment and storage medium
CN111332306A (en) Traffic road perception auxiliary driving early warning device based on machine vision
CN113487649B (en) Vehicle detection method and device and computer storage medium
CN112529011A (en) Target detection method and related device
CN112902911A (en) Monocular camera-based distance measurement method, device, equipment and storage medium
WO2022142827A1 (en) Road occupancy information determination method and apparatus
CN114333390B (en) Method, device and system for detecting shared vehicle parking event
CN113378803B (en) Road traffic accident detection method, device, computer and storage medium
CN112101139B (en) Human shape detection method, device, equipment and storage medium
CN113313968A (en) Parking space detection method and storage medium
CN113903188A (en) Parking space detection method, electronic device and computer readable storage medium
CN115063772B (en) Method for detecting vehicles after formation of vehicles, terminal equipment and storage medium
US20230154133A1 (en) Key point correction system, key point correction method, and nontransitory computer readable medium
CN114463378B (en) Target tracking method, electronic device and storage medium
CN114898325B (en) Vehicle dangerous lane change detection method and device and electronic equipment

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