CN111652143B - 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
CN111652143B
CN111652143B CN202010496693.3A CN202010496693A CN111652143B CN 111652143 B CN111652143 B CN 111652143B CN 202010496693 A CN202010496693 A CN 202010496693A CN 111652143 B CN111652143 B CN 111652143B
Authority
CN
China
Prior art keywords
frame
vehicle
tail lamp
detection
parking space
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.)
Active
Application number
CN202010496693.3A
Other languages
Chinese (zh)
Other versions
CN111652143A (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

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 parking space images of continuous multiframes; acquiring a vehicle frame in the parking space image through a target detection model; a tail lamp detection algorithm is adopted to obtain a tail lamp detection frame from a vehicle frame, and a tail lamp zone bit is calculated based on the tail lamp detection frame; dividing an effective detection area in a vehicle frame according to the state value of the tail lamp zone bit; and positioning the license plate frame in an effective detection area of the vehicle frame. Through the method, the vehicle frame is adaptively cut through the state of the tail lamp zone bit, the effective area for 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, apparatus, and computer storage medium.
Background
Along with the successful application of an Intelligent Traffic 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 smart cities; the monitoring of the state of the parked vehicle at the road side is taken as an important component of the ITS, and the effective area of the license plate and the vehicle posture estimation method are rapidly and accurately positioned, so that the method becomes a key measurement standard of the ITS intelligent level.
The method in the prior art takes the whole image as data input, has higher preprocessing complexity and is difficult to meet the real-time requirement.
Disclosure of Invention
The application provides a vehicle detection method, a vehicle detection device and a computer storage medium, which are used for solving the problems that the complexity of image processing is high and the real-time requirement is difficult to meet in the prior art.
In order to solve the technical problems, the application adopts a technical scheme that: provided is a vehicle detection method including:
acquiring parking space images of continuous multiframes;
acquiring a vehicle frame in the parking space image through a target detection model;
a tail lamp detection algorithm is adopted to obtain a tail lamp detection frame from the vehicle frame, and a tail lamp zone bit is calculated 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;
and positioning a license plate frame in an effective detection area of the vehicle frame.
The step of acquiring the vehicle frame in the parking space image through the target detection model comprises the following steps:
acquiring a vehicle frame and a corresponding confidence coefficient in the parking space image through the target detection model;
comparing the confidence level of the vehicle frame of the continuous multi-frame parking space image with a confidence level 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 frame parking space image with the confidence coefficient larger than the confidence coefficient threshold value as the initial frame, the vehicle detection method further comprises the following steps:
acquiring coordinates of a central point of a vehicle frame in a parking space image of the initial frame and the subsequent frame;
calculating Euclidean distance of coordinates of a central point of a vehicle frame in each two parking space images;
and if the Euclidean distances are smaller than the distance threshold value, judging that the vehicle is in a stable state.
The step of calculating the tail lamp zone bit based on the tail lamp detection frame comprises the following steps:
when the tail lamp detection frame does not exist in the parking space image, setting the tail lamp zone bit to 0;
when one tail lamp detection frame exists in the parking space image, setting the tail lamp zone bit to be 1;
when two tail lamp detection frames exist in the parking space image and the area ratio of the two tail lamp detection frames is smaller than a ratio threshold value, setting the tail lamp zone bit to be 0;
and when two tail lamp detection frames exist in the parking space image and the area ratio of the two tail lamp detection frames is larger than or equal to the ratio threshold value, setting the tail lamp zone bit to be 1.
After the step of calculating the tail lamp flag bit based on the tail lamp detection frame, the vehicle detection method further includes:
taking the parking space image with the highest confidence coefficient in all the parking space images as a final parking space image;
acquiring tail lamp zone bits of all parking space images to perform accumulation processing;
when the accumulated processing result is greater than half of the number of frames of all the parking space images, the final tail lamp mark bit is set to be 1;
and when the accumulated processing result is less than or equal to half of the number of frames of all the parking space images, the final tail lamp mark bit is set to 0.
Wherein, the step of locating the license plate frame in the effective detection area of the vehicle frame comprises the following steps:
when the final tail lamp mark bit is 0, setting the lower half area of the vehicle frame of the final parking space image as the effective detection area;
when the final tail lamp mark bit is 1, setting an area of a vehicle frame of the final parking space image, which contains the tail lamp detection frame, as the effective detection area;
and detecting and positioning the license plate frame in the effective detection area by using 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 pose information of the vehicle according to the license plate frame and the calibrated license plate aspect ratio.
Wherein the pose information includes an offset angle;
the step of calculating pose information of the vehicle according to the license plate frame and the calibrated license plate aspect ratio comprises the following steps:
calculating the aspect ratio of the license plate frame according to the width and the height of the license plate frame;
the offset angle of the vehicle is obtained from the aspect ratio of the license plate frame and the scaled license plate aspect ratio.
The step of calculating pose information of the vehicle according to the license plate frame and the calibrated license plate aspect ratio comprises the following steps:
and if the tail lamp detection frame cannot be acquired from the vehicle frame, judging that the vehicle is parked in the back direction.
In order to solve the technical problems, the application adopts another technical scheme that: there is provided a vehicle detection apparatus including a processor and a memory; the memory has stored therein a computer program for execution by the processor to perform the steps of the vehicle detection method as described above.
In order to solve the technical problems, the application adopts another technical scheme that: there is provided a computer storage medium storing a computer program which when executed performs the steps of the above-described vehicle detection method.
Compared with the prior art, the application has the beneficial effects that: the vehicle detection device acquires parking space images of continuous multiframes; acquiring a vehicle frame in the parking space image through a target detection model; a tail lamp detection algorithm is adopted to obtain a tail lamp detection frame from a vehicle frame, and a tail lamp zone bit is calculated based on the tail lamp detection frame; dividing an effective detection area in a vehicle frame according to the state value of the tail lamp zone bit; and positioning the license plate frame in an effective detection area of the vehicle frame. Through the method, the vehicle frame is adaptively cut through the state of the tail lamp zone bit, the effective area for 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 of the embodiments of the present application, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort to those of ordinary skill in the art.
FIG. 1 is a schematic flow chart of an embodiment of a vehicle detection method according to the present application;
FIG. 2 is a schematic diagram of an effective detection area obtained by dividing a vehicle frame up and down;
FIG. 3 is a schematic diagram of an effective detection area obtained by dividing a vehicle frame left and right;
FIG. 4 is a flow chart of another embodiment of a vehicle detection method provided by the present application;
FIG. 5 is a schematic view of an embodiment of a vehicle detection apparatus according to the present application;
fig. 6 is a schematic structural diagram of an embodiment of a computer storage medium according to the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The application provides a vehicle detection method for solving the problems that the complexity of image processing is high and the real-time requirement is difficult to meet in the prior art. Referring to fig. 1, fig. 1 is a schematic flow chart of an embodiment of a vehicle detection method according to the present application.
The vehicle detection method is applied to a vehicle detection device, wherein the vehicle detection device can be a server, terminal equipment or a system formed by mutually matching the server and the terminal equipment. Accordingly, each part, for example, each unit, sub-unit, module, sub-module, included in the vehicle detection apparatus may be all provided in the server, may be all provided in the terminal device, or may be provided in the server and the terminal device, respectively.
Further, the server may be hardware or software. When the server is hardware, the server may be implemented as a distributed server cluster formed by a plurality of 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 a distributed server, or may be implemented as a single software or software module, which is not specifically limited herein.
As shown in fig. 1, the vehicle detection method of the present embodiment specifically includes the steps of:
s101: and acquiring parking space images of a plurality of continuous frames.
Wherein, two stability conditions of the side azimuth scene: (1) The roadside cameras have the same installation standard, and the height and the inclination angle of the cameras are fixed; (2) The external dimension standard of the domestic license plate is unified, and the aspect ratio R_calibration of the license plate in the side calibration scene is a calibration constant.
In this regard, the vehicle detection device needs to calibrate the license plate under the calibration scene, and the calibration process is specifically as follows: firstly, a camera is fixedly installed at a position corresponding to a roadside position, then a vehicle is positively parked in a roadside position area to carry out license plate calibration, and the vehicle is reversely parked in the roadside position area to carry out license plate calibration, and finally, according to a forward vehicle head and vehicle tail image of the camera in a side position scene, the aspect ratio R_calibration of a calibrated license plate is calculated, and the method specifically comprises the aspect ratio R_head of the vehicle head license plate and the aspect ratio R_tail of the vehicle tail license plate.
After the license plate calibration is completed, the vehicle detection method collects parking space images of continuous multiframes 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 vehicles in the parking space image through the target detection model so as to acquire vehicle frames of the vehicles in the parking space image, specifically coordinates and confidence of the vehicle frames in the parking space image.
Specifically, the vehicle detection device can set CNN convolutional neural network parameters to train training set data through a YOLOV3 target detection training method based on deep learning, so as to obtain a target detection model used in the 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 taillight detection algorithm to carry out positioning detection on the lateral vehicle in a stable state, and obtains a taillight detection frame in the vehicle frame. Further, the vehicle detecting device calculates the tail lamp flag bit according to the number of the tail lamp detecting frames and the mutual positional relationship.
Specifically, the vehicle detection device establishes a taillight_flag (TailLight Flag) and od_score (vehicle frame confidence) queue, and stores the taillight_flag value and the vehicle frame confidence od_score of the current frame until the accumulated N frame ends. In this embodiment, the N frames are set to 5-8 frames, and excessive frame number setting may result in increased algorithm processing time consumption, and insufficient frame number setting may not avoid accidental abnormal results of the vehicle frame.
The TailLight Flag bit taillight_flag state value output is related to the TailLight detection result, that is, the number of the TailLight detection frames and the mutual position relationship. For example, when the area ratio U > =threshold_tail of only 1 or two Tail light detection frames, the Tail light Flag bit status 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 tail lamp Flag bit TailLight_flag state value is output as 1. The representation format is as follows:
wherein U is the area ratio of two tail lamp detection frames, threshold_tail is a set ratio Threshold, generally 4-6, and BBox is the number of tail lamp detection frames.
The area ratio U of the tail light detection frame is calculated as follows: let the larger one of the two tail light detection frames be S0 and the other be S1, the area ratio u=s0/S1 of the two tail light detection frames.
S104: and dividing an effective detection area in the vehicle frame according to the state value of the tail lamp zone bit.
The vehicle detection device further obtains a Tail lamp Flag bit sum_tail by performing a summation operation on the taillight_flag state value in the Tail lamp Flag bit queue in step 103. When sum_Tail > N/2, the final Tail lamp flag bit is set to 1; when sum_tail < = N/2, the final Tail lamp flag bit is set to 0.
Further, the vehicle detection device uses the parking space image with the highest confidence level od_score of the vehicle frame in the queue as a final parking space image, wherein the vehicle frame is the final vehicle frame. In addition, the vehicle detection device calculates an effective detection area in a final vehicle frame through the final parking space image and the comprehensive multi-frame tail lamp mark position operation result under the vehicle stable state, so that the stability of the target state is ensured. 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 light mark position is 0, the vehicle detection device performs up-down segmentation processing on the final vehicle frame, and uses the lower half part of the final vehicle frame as an effective detection area for license plate detection, see fig. 2 specifically; when the final tail light mark bit is 1, the vehicle detection device performs left-right division processing on the final vehicle frame, and selects the vehicle frame division portion including the tail light detection frame as an effective detection area for license plate detection in combination with the position of the tail light detection frame, specifically referring to fig. 3.
S105: and positioning the license plate frame in an effective detection area of the vehicle frame.
The vehicle detection device adopts the YOLO deep learning detection algorithm to detect and position the license plate in the effective detection area of the license plate frame 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 positioning information (x, y, w, h), wherein (x, y) is the center point coordinate of the license plate detection frame, w is the width of the license plate detection frame, and h is the height of the license plate detection frame.
In some possible embodiments, the vehicle detection device may further calculate 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 plate p The deviation angle theta of the target vehicle is obtained through the proportional relation between the aspect ratio R_calibrated of the scene calibration license plate and the specific calculation formula is as follows:
K p =w/h
further, the vehicle detection device can also judge the parking direction of the vehicle relative to the camera through the detection result of the tail lamp. When a tail lamp detection frame exists in the vehicle frame, the vehicle detection device judges that the vehicle is parked positively; when the tail light detection frame does not exist in the vehicle frame, the vehicle detection device determines that the vehicle is parked in the reverse direction.
Finally, the vehicle detection device outputs pose information of the vehicle according to the deviation angle and the parking direction of the vehicle.
In the present embodiment, the vehicle detection device acquires parking space images of consecutive multiframes; acquiring a vehicle frame in the parking space image through a target detection model; a tail lamp detection algorithm is adopted to obtain a tail lamp detection frame from a vehicle frame, and a tail lamp zone bit is calculated based on the tail lamp detection frame; dividing an effective detection area in a vehicle frame according to the state value of the tail lamp zone bit; the application adaptively cuts the vehicle frame through the state of the tail lamp zone bit to determine the effective area of license plate detection, thereby effectively reducing the license plate detection area, reducing the calculated amount and improving the vehicle positioning efficiency.
On the basis of the above embodiment of the vehicle detection method, the present application further provides another specific vehicle detection method, and referring specifically to fig. 4, fig. 4 is a schematic flow chart 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 steps of:
s201: and acquiring parking space images of a plurality of continuous frames.
S202: and acquiring a vehicle frame and corresponding confidence coefficient in the parking space image through the target detection model.
The confidence is an index for measuring the coordinate quality of the vehicle frame output by the target detection model, and the higher the confidence 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 conveniently selected subsequently.
S203: the confidence level of the vehicle frame of the parking space images of the consecutive multiframes is compared with a confidence level threshold.
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 according to the acquisition sequence of the parking space image until the parking space image of the vehicle frame with the first frame confidence coefficient larger than the set confidence coefficient threshold is acquired, and the frame of the parking space image is used as a starting frame of the 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 larger than the set confidence coefficient threshold value is located is used as the initial frame parking space image of the vehicle detection method, so that the unreliable vehicle frame detection result in the initial state can be effectively filtered, and the stability of the subsequently detected vehicle is ensured.
S205: and acquiring coordinates of a central point of a vehicle frame in the parking space images of the initial frame and the subsequent frames.
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 may set the inter-frame step length to be Δstep frames, and only needs to acquire coordinates of a central point of a vehicle frame in the parking space image between the start frame and the Δstep frame.
S206: and calculating Euclidean distance of coordinates of the central point of the vehicle frame in each two parking space images.
Wherein the vehicle detecting device sets the Euclidean distance between the coordinates of the vehicle frame center point between the start frame and the Deltastep frame to DeltaS, and assumes that the coordinates of the vehicle frame center point of the start frame is C_start (X s ,Y s ) The center point coordinate of the vehicle frame of the termination frame is C_end (X e ,Y e ) The formula for calculating the Euclidean distance displacement is specifically as follows:
s207: and if the Euclidean distances are smaller than the distance threshold value, judging that the vehicle is in a stable state.
When the Euclidean distance between the center points of the vehicle frames of the starting frame and the ending frame is smaller than the set distance threshold, the vehicle detection device judges that the vehicle is in a stable state, and can further position pose information of the vehicle.
In order to implement the vehicle detection method of the above embodiment, the present application further provides a vehicle detection device, and referring specifically to fig. 5, fig. 5 is a schematic structural diagram of an embodiment of the vehicle detection device provided by 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, and the memory 52 stores a computer program, and the processor 51 is configured to execute the computer program to implement the vehicle detection method of the above 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 with signal processing capabilities. 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, graphics processor), also called a display core, a vision processor, a display chip, and is a microprocessor that is specially used for image computation 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, controlling the correct display of the display, and is an important element for connecting the display and a personal computer mainboard and is also one of important equipment for 'man-machine conversation'. The display card is an important component in the host computer, and is very important for people who are engaged in professional graphic design to take on the task of outputting and displaying graphics. The 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 600 for storing a computer program 61, as shown in fig. 6, which computer program 61, when executed by a processor, is adapted to carry out the method according to an embodiment of the vehicle detection method of the present application.
The method according to the embodiment of the vehicle detection method of the present application may be stored in a device, such as a computer readable storage medium, when implemented in the form of a software functional unit and sold or used as a stand alone product. Based on such understanding, the technical solution of the present application may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a storage medium, including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (processor) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing description is only of embodiments of the present application, and is not intended to limit the scope of the application, and all equivalent structures or equivalent processes using the descriptions and the drawings of the present application or directly or indirectly applied to other related technical fields are included in the scope of the present application.

Claims (9)

1. A vehicle detection method, characterized in that the vehicle detection method comprises:
acquiring parking space images of continuous multiframes;
acquiring a vehicle frame in the parking space image through a target detection model;
a tail lamp detection algorithm is adopted to obtain a tail lamp detection frame from the vehicle frame, and a tail lamp zone bit is calculated 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;
positioning a license plate frame in an effective detection area of the vehicle frame;
the step of obtaining the vehicle frame in the parking space image through the target detection model comprises the following steps:
acquiring a vehicle frame and a corresponding confidence coefficient in the parking space image through the target detection model;
comparing the confidence level of the vehicle frame of the continuous multi-frame parking space image with a confidence level threshold;
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 frame parking space image with the confidence coefficient larger than the confidence coefficient threshold value as a start frame, the vehicle detection method further includes:
acquiring coordinates of a central point of a vehicle frame in a parking space image of the initial frame and the subsequent frame;
calculating Euclidean distance of coordinates of a central point of a vehicle frame in each two parking space images;
and if the Euclidean distances are smaller than the distance threshold value, judging that the vehicle is in a stable state.
2. The vehicle detection method according to claim 1, characterized in that,
the step of calculating the tail lamp zone bit based on the tail lamp detection frame comprises the following steps:
when the tail lamp detection frame does not exist in the parking space image, setting the tail lamp zone bit to 0;
when one tail lamp detection frame exists in the parking space image, setting the tail lamp zone bit to be 1;
when two tail lamp detection frames exist in the parking space image and the area ratio of the two tail lamp detection frames is smaller than a ratio threshold value, setting the tail lamp zone bit to be 0;
and when two tail lamp detection frames exist in the parking space image and the area ratio of the two tail lamp detection frames is larger than or equal to the ratio threshold value, setting the tail lamp zone bit to be 1.
3. The vehicle detection method according to claim 2, characterized in that,
after the step of calculating the tail lamp flag bit based on the tail lamp detection frame, the vehicle detection method further includes:
taking the parking space image with the highest confidence coefficient in all the parking space images as a final parking space image;
acquiring tail lamp zone bits of all parking space images to perform accumulation processing;
when the accumulated processing result is greater than half of the number of frames of all the parking space images, the final tail lamp mark bit is set to be 1;
and when the accumulated processing result is less than or equal to half of the number of frames of all the parking space images, the final tail lamp mark bit is set to 0.
4. The vehicle detection method according to claim 3, characterized in that,
the step of locating the license plate frame within the effective detection area of the vehicle frame comprises the following steps:
when the final tail lamp mark bit is 0, setting the lower half area of the vehicle frame of the final parking space image as the effective detection area;
when the final tail lamp mark bit is 1, setting an area of a vehicle frame of the final parking space image, which contains the tail lamp detection frame, as the effective detection area;
and detecting and positioning the license plate frame in the effective detection area by using a YOLO deep learning detection algorithm, and acquiring the width and the height of the license plate frame.
5. The vehicle detection method according to claim 1, characterized in that, after the step of positioning a license plate frame within an effective detection area of the vehicle frame, the vehicle detection method further comprises:
and calculating pose information of the vehicle according to the license plate frame and the calibrated license plate aspect ratio.
6. The vehicle detection method according to claim 5, characterized in that,
the pose information comprises an offset angle;
the step of calculating pose information of the vehicle according to the license plate frame and the calibrated license plate aspect ratio comprises the following steps:
calculating the aspect ratio of the license plate frame according to the width and the height of the license plate frame;
the offset angle of the vehicle is obtained from the aspect ratio of the license plate frame and the scaled license plate aspect ratio.
7. The vehicle detection method according to claim 5, characterized in that,
the step of calculating pose information of the vehicle according to the license plate frame and the calibrated license plate aspect ratio comprises the following steps:
and if the tail lamp detection frame cannot be acquired from the vehicle frame, judging that the vehicle is parked in the back direction.
8. A vehicle detection apparatus, characterized in that the vehicle detection apparatus comprises a processor and a memory; the memory has stored therein a computer program for executing the computer program to implement the steps of the vehicle detection method according to any one of claims 1 to 7.
9. A computer storage medium storing a computer program which, when executed by a processor, implements the steps of the vehicle detection method according to any one of claims 1 to 7.
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 CN111652143A (en) 2020-09-11
CN111652143B true 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)

Families Citing this family (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 (11)

* 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
JP2008040519A (en) * 2006-08-01 2008-02-21 Hitachi Information & Control Solutions Ltd Portable type illegally parked vehicle photographing device
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
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

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4268208B2 (en) * 2005-02-03 2009-05-27 富士通株式会社 Vehicle image data generation program and vehicle image data generation device
US8447112B2 (en) * 2010-12-17 2013-05-21 Xerox Corporation Method for automatic license plate recognition using adaptive feature set
US8682036B2 (en) * 2012-04-06 2014-03-25 Xerox Corporation System and method for street-parking-vehicle identification through license plate capturing
US10540564B2 (en) * 2014-06-27 2020-01-21 Blinker, Inc. Method and apparatus for identifying vehicle information from an image

Patent Citations (11)

* 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
JP2008040519A (en) * 2006-08-01 2008-02-21 Hitachi Information & Control Solutions Ltd Portable type illegally parked vehicle photographing device
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
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
宋俊芳 ; 宋翔宇 ; 郭晓军 ; 王卫星 ; .构建多部件关系概率模型的车辆检测方法.西安电子科技大学学报.2017,(03),全文. *
张晶 ; 高彦彦 ; 史源平 ; .基于YUV空间和边缘能量的车牌检测方法.电视技术.2017,(Z3),全文. *
王枚 ; 潘国华 ; 王国宏 ; .一种实用的夜间车牌目标定位方法.微计算机信息.2008,(24),全文. *

Also Published As

Publication number Publication date
CN111652143A (en) 2020-09-11

Similar Documents

Publication Publication Date Title
CN111383460B (en) Vehicle state discrimination method and device and computer storage medium
CN108629292B (en) Curved lane line detection method and device and terminal
EP3627109A1 (en) Visual positioning method and apparatus, electronic device and system
CN109241938B (en) Road congestion detection method and terminal
CN112560684B (en) Lane line detection method, lane line detection device, electronic equipment, storage medium and vehicle
CN112528807B (en) Method and device for predicting running track, electronic equipment and storage medium
CN112465871B (en) Evaluation method and system for accuracy of visual tracking algorithm
CN113139482A (en) Method and device for detecting traffic abnormity
CN110667474B (en) General obstacle detection method and device and automatic driving system
CN112733703A (en) Vehicle parking state detection method and system
CN110751836A (en) Vehicle driving early warning method and system
CN111652143B (en) Vehicle detection method and device and computer storage medium
CN117671615A (en) Traffic accident detection method based on unmanned aerial vehicle inspection real-time image and electronic equipment
CN113487649B (en) Vehicle detection method and device and computer storage medium
CN111332306A (en) Traffic road perception auxiliary driving early warning device based on machine vision
CN113850752A (en) Vehicle overload detection method, device and storage medium
CN112902911B (en) Ranging method, device, equipment and storage medium based on monocular camera
CN114333390B (en) Method, device and system for detecting shared vehicle parking event
CN107452230B (en) Obstacle detection method and device, terminal equipment and storage medium
WO2022142827A1 (en) Road occupancy information determination method and apparatus
CN112507964B (en) Detection method and device for lane-level event, road side equipment and cloud control platform
CN111540217B (en) Mask matrix-based intelligent average vehicle speed monitoring method and system
Chingting et al. Traffic Lane Line Classification System by Real-time Image Processing
CN114926454B (en) Parking space detection method and device and electronic equipment
CN114913469B (en) Method for establishing vehicle length estimation model, terminal equipment and storage medium

Legal Events

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