Method and system for detecting vehicle position

By constructing a three-dimensional bounding box position detection model, the problem of false alarms of illegal parking caused by misjudgment of two-dimensional vehicle coordinates in the existing technology is solved, and higher-precision vehicle position detection is achieved, reducing the false alarm rate and management costs.

CN112950704BActive Publication Date: 2025-09-16EVOC INTELLIGENT TECH
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN201911265515.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-12-11
Publication Date
2025-09-16
Estimated Expiration
2039-12-11

AI Technical Summary

Technical Problem

Existing technologies use two-dimensional vehicle coordinates to determine illegal parking, resulting in a high false alarm rate and an inability to accurately distinguish the actual overlap between vehicles and prohibited parking areas, increasing management costs.

Method used

Using three-dimensional bounding box technology, a three-dimensional bounding box of the target vehicle is constructed through a position detection model. The position information of the bounding box and the position information of the target area are combined to determine the positional relationship between the vehicle and the area, thereby reducing the probability of false alarms.

Benefits of technology

It improves the accuracy of vehicle location detection, reduces the false alarm rate, reduces the need for manual investigation, and reduces management costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112950704B_ABST
    Figure CN112950704B_ABST
Patent Text Reader

Abstract

The present invention provides a method and system for detecting the position of a vehicle. The method includes: obtaining a two-dimensional target image containing a target area, the two-dimensional target image including: a reference target; inputting the two-dimensional target image into a preset position detection model; extracting features of the reference target through the position detection model; constructing an enclosing frame of the target vehicle through the position detection model and based on the position information of the target vehicle in the two-dimensional target image, wherein the enclosing frame includes: at least four corner points, and the target vehicle is located in a three-dimensional space formed by the at least four corner points; determining the positional relationship between the target vehicle and the target area based on the position information of the enclosing frame and the position information of the target area, and providing a detection result. The present invention calibrates the position of the target vehicle through a three-dimensional enclosing frame, thereby improving the accuracy of locating the target vehicle, thereby effectively reducing the probability of false alarms.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image detection technology, and in particular to a method and system for detecting the position of a vehicle. Background Art

[0002] With the continuous development of science and technology and the continuous improvement of people's material living standards, the automobile industry has experienced rapid development and private cars have become increasingly popular. However, with the continuous acceleration of urbanization, a large number of people have flocked to cities, resulting in a rapid increase in the number of vehicles in cities. The shortage of urban parking spaces has led to a serious problem of illegal parking, which can easily lead to chaos or even paralysis in urban traffic, ultimately causing huge economic losses.

[0003] Currently, surveillance cameras are widely distributed on roads and in residential properties. Machine vision can be used to replace manual supervision of illegal parking areas. If a vehicle is found to have stayed in a defined illegal parking area for a certain period of time, the monitoring system administrator will be notified and the vehicle will be fined.

[0004] The method for detecting illegally parked vehicles mainly includes two parts: first, the illegal parking area needs to be defined manually; then, the vehicle in the monitoring image is detected through machine vision to confirm whether the vehicle's coordinates are within the illegal parking area.

[0005] However, existing technologies typically only use two-dimensional vehicle coordinates to determine illegal parking. A vehicle is considered illegally parked when there is a certain degree of overlap between the vehicle and the prohibited parking zone. However, due to the varying viewing angles of surveillance cameras, sometimes a vehicle is not illegally parked, but simply overlaps significantly with the prohibited parking zone in the two-dimensional target image captured by the machine vision system, resulting in a false alarm. This requires manual investigation, increasing management costs. Summary of the Invention

[0006] To solve the above problems, the present invention provides a method and system for detecting the position of a vehicle, which improves the accuracy of positioning the target vehicle through a three-dimensional bounding box, thereby effectively reducing the probability of false alarms.

[0007] In a first aspect, the present invention provides a method for detecting a vehicle position, comprising:

[0008] Acquiring a two-dimensional target image containing a target area, the two-dimensional target image including: a reference target;

[0009] Inputting the two-dimensional target image into a preset position detection model;

[0010] Performing feature extraction on the reference target using the position detection model;

[0011] In a case where the reference target includes a target vehicle, constructing a bounding box of the target vehicle using the position detection model and based on position information of the target vehicle in the two-dimensional target image, wherein the bounding box includes at least four corner points, and the target vehicle is located in a three-dimensional space formed by the at least four corner points;

[0012] According to the position information of the enclosing frame and the position information of the target area, the positional relationship between the target vehicle and the target area is determined, and a detection result is given.

[0013] Optionally, the target area is a two-dimensional area;

[0014] The determining, based on the position information of the enclosing frame and the position information of the target area, a positional relationship between the target vehicle and the target area includes:

[0015] The positional relationship between the target vehicle and the target area is determined based on the position information of the projection point of the particle and the position information of the target area, wherein the particle is the geometric center of the bounding box, and the projection point of the particle is the point formed by the positive projection of the particle on the plane where the target area is located.

[0016] Optionally, after extracting features from the reference target, the method further includes:

[0017] Predicting a category confidence of the reference target, wherein the category confidence includes: a vehicle category confidence, which is used to determine whether a target vehicle exists in the two-dimensional target image;

[0018] According to the vehicle category confidence, it is determined whether the reference targets include the target vehicle.

[0019] Optionally, constructing a bounding box of the target vehicle using the position detection model and according to position information of the target vehicle in the two-dimensional target image includes:

[0020] Through the position detection model and based on the position information of the reference target in the two-dimensional target image, the position information of the corner points of the reference target in the two-dimensional target image and the confidence of the vehicle category of the reference target are determined, and the bounding box of the target vehicle is constructed.

[0021] Optionally, the method further comprises: training the position detection model;

[0022] The training of the position detection model comprises:

[0023] Step S501: obtaining a two-dimensional sample image containing a sample area, wherein the two-dimensional sample image includes: a reference sample;

[0024] Step S502: inputting the two-dimensional sample image into the position detection model;

[0025] Step S503: extracting features from the reference sample using the position detection model;

[0026] Step S504: constructing a predicted bounding box based on the sample features using the position detection model, and predicting the predicted category confidence of the reference sample, wherein the predicted bounding box includes at least four predicted corner points, and the reference sample is located in a three-dimensional space formed by the at least four predicted corner points;

[0027] Step S505: Compare the position information of the predicted bounding box with the position information of the predetermined reference bounding box to obtain first error information;

[0028] Step S506: Compare the predicted category confidence with a predetermined reference category confidence to obtain second error information;

[0029] Step S507: updating the convolution kernel of the position detection model according to the first error information and the second error information;

[0030] Step S508: Determine whether the number of updates of the model reaches a threshold. If so, end the training; if not, execute step S501.

[0031] Optionally, the position detection model includes 18 convolutional layers, 5 maximum pooling layers, 1 average pooling layer and 1 classification output layer, wherein the convolutional layers include: a first convolutional layer and a second convolutional layer, the size of the convolution kernel of the first convolutional layer is larger than the size of the convolution kernel of the second convolutional layer, and the first convolution kernel and the second convolution kernel are convolved alternately in sequence.

[0032] In a second aspect, the present invention provides a vehicle position detection system, comprising:

[0033] An acquisition module is configured to acquire a two-dimensional target image containing a target area, wherein the two-dimensional target image includes: a reference target;

[0034] an input module, configured to input the two-dimensional target image into a preset position detection model;

[0035] an extraction module, configured to perform feature extraction on the reference target;

[0036] a construction module configured to, when the reference target includes a target vehicle, construct a bounding box of the target vehicle based on position information of the target vehicle in the two-dimensional target image, wherein the bounding box includes at least four corner points, and the target vehicle is located in a three-dimensional space formed by the at least four corner points;

[0037] The determination module is configured to determine the positional relationship between the target vehicle and the target area according to the position information of the enclosing frame and the position information of the target area, and provide a detection result.

[0038] Optionally, the target area is a two-dimensional area;

[0039] The determination module is further configured to determine the positional relationship between the target vehicle and the target area based on the position information of the projection point of the particle and the position information of the target area, wherein the particle is the geometric center of the bounding box, and the projection point of the particle is the point formed by the positive projection of the particle on the plane where the target area is located.

[0040] Optionally, the system further comprises: a training module;

[0041] The training module includes:

[0042] The acquisition submodule is configured to acquire a two-dimensional sample image containing a sample area, wherein the two-dimensional sample image includes: a reference sample;

[0043] an input submodule, configured to input the two-dimensional sample image into the position detection model;

[0044] an extraction submodule, configured to perform feature extraction on the reference sample using the position detection model;

[0045] a construction submodule configured to construct a predicted bounding box based on the sample features using the position detection model, and predict a predicted category confidence of the reference sample, wherein the predicted bounding box includes at least four predicted corner points, and the reference sample is located in a three-dimensional space formed by the at least four predicted corner points;

[0046] a first comparison submodule configured to compare the position information of the predicted bounding box with the position information of the predetermined reference bounding box to obtain first error information;

[0047] a second comparison submodule, configured to compare the predicted category confidence with a predetermined reference category confidence to obtain second error information;

[0048] an updating submodule, configured to update a convolution kernel of a position detection model according to the first error information and the second error information;

[0049] The first judgment submodule is configured to judge whether the number of updates of the model reaches a threshold, and if so, terminate the training; if not, execute the acquisition submodule.

[0050] Optionally, the position detection model includes 18 convolutional layers, 5 maximum pooling layers, 1 average pooling layer and 1 classification output layer, wherein the convolutional layers include: a first convolutional layer and a second convolutional layer, the size of the convolution kernel of the first convolutional layer is larger than the size of the convolution kernel of the second convolutional layer, and the first convolution kernel and the second convolution kernel are convolved alternately in sequence.

[0051] The vehicle position detection method and system provided in the embodiments of the present invention can improve the accuracy of positioning the target vehicle by constructing a three-dimensional bounding box to calibrate the position relationship of the target vehicle relative to the target area, thereby effectively reducing the probability of false alarms. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] Figure 1 A schematic flow chart of the detection method of an embodiment of the present application;

[0053] Figure 2 A schematic flow chart of the detection method of an embodiment of the present application;

[0054] Figure 3 Schematic diagram of the detection system according to an embodiment of the present application;

[0055] Figure 4 This is a state diagram of the positional relationship between the bounding box, the vehicle, and the target area in an embodiment of the present application. DETAILED DESCRIPTION

[0056] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.

[0057] In a first aspect, the present invention provides a method for detecting the position of a vehicle, see Figure 1 , Figure 1 A schematic flow chart of a detection method according to an embodiment of the present application is shown, the method comprising:

[0058] Step S101: Acquire a two-dimensional target image containing a target area, wherein the two-dimensional target image includes a reference target.

[0059] The target area is a pre-set area, which can be defined as an area where the target vehicle is prohibited from parking or an area where the target vehicle is allowed to park. Specifically, it can be a two-dimensional area or a three-dimensional area marked on the ground; the target vehicle can be an airplane, a ship or a car, etc.

[0060] In this embodiment, the target vehicle is a car, and the target area is a two-dimensional, no-parking zone marked on the ground. The reference target is any object in the two-dimensional target image, such as, but not limited to, pedestrians, animals, utility poles, trash cans, vehicles, and bicycles.

[0061] Step S102: inputting the two-dimensional target image into a preset position detection model.

[0062] Step S103: extracting features of the reference target using the position detection model.

[0063] Step S104: When the reference target includes a target vehicle, a bounding box of the target vehicle is constructed through the position detection model and according to the position information of the target vehicle in the two-dimensional target image, wherein the bounding box includes: at least four corner points, and the target vehicle is located in the three-dimensional space formed by the at least four corner points.

[0064] Due to the different types of target vehicles, the number of corner points of the corresponding three-dimensional bounding box is also different.

[0065] For example, based on the overall shape of an airplane, four corner points are generally required to form a three-dimensional bounding box; based on the overall shape of a car, eight corner points are generally required to form a three-dimensional bounding box; based on the overall shape of a ship, at least eight corner points are generally required to form a three-dimensional bounding box.

[0066] In this embodiment, the bounding box includes eight corner points, and the bounding box is a rectangular parallelepiped space.

[0067] Step S105: determining the positional relationship between the target vehicle and the target area according to the position information of the enclosing frame and the position information of the target area, and providing a detection result.

[0068] See also Figure 4 , Figure 4A state diagram showing the positional relationship between the bounding box, the vehicle, and the target area according to one embodiment of the present application. If the target area is a no-parking zone, the position information of the corner points can be used to determine whether the bounding box falls within the target area. If so, the detection result indicates that the target vehicle has entered the no-parking zone; if not, the detection result indicates that the target vehicle has not entered the no-parking zone. If a vehicle is detected to have stayed in a custom no-parking zone for longer than a certain period of time, the monitoring system administrator is notified to ticket the vehicle and impose appropriate penalties.

[0069] When the target area is an area where parking is allowed, it can be determined whether the bounding box completely falls within the target area based on the position information of the corner points. If so, the detection result is that the target vehicle has correctly parked in the target area; if not, the detection result is that the target vehicle has not correctly parked in the target area, which can remind the driver to continue adjusting the position of the vehicle relative to the target area.

[0070] The detection method constructs a three-dimensional bounding box to calibrate the positional relationship of the target vehicle relative to the target area, which can avoid ignoring the misalignment relationship between the target vehicle and the target area due to visual errors on the two-dimensional image. This can improve the accuracy of positioning the target vehicle and effectively reduce the probability of false alarms.

[0071] In an optional embodiment, the target area is a two-dimensional area;

[0072] Determining the positional relationship between the target vehicle and the target area based on the position information of the bounding box and the position information of the target area includes: determining the positional relationship between the target vehicle and the target area based on the position information of the projection point of the particle and the position information of the target area.

[0073] The particle is the geometric center of the bounding box, and the projection point of the particle is the point formed by the orthographic projection of the particle on the plane where the target area is located.

[0074] Determining the positional relationship between the target vehicle and the target area based on the projection points of the particle can reduce the steps of calculating the positional relationship of the corner points relative to the target area, thereby improving the detection efficiency of the detection method.

[0075] In an optional embodiment, after extracting features from the reference target, the method further includes:

[0076] Predicting a category confidence of the reference target, wherein the category confidence includes: a vehicle category confidence, which is used to determine whether a target vehicle exists in the two-dimensional target image;

[0077] According to the vehicle category confidence, it is determined whether the reference targets include the target vehicle.

[0078] The setting of the vehicle category confidence level can identify whether the reference target is a vehicle, thereby simplifying the calculation steps when the reference target is determined to be the target vehicle.

[0079] In this embodiment, the category confidence also includes background category confidence, which is used to determine whether the target vehicle is blocked by an obstacle. This can further improve the prediction accuracy of the position detection model.

[0080] In an optional embodiment, constructing a bounding box of the target vehicle using the position detection model and according to the position information of the target vehicle in the two-dimensional target image includes:

[0081] Through the position detection model and based on the position information of the reference target in the two-dimensional target image, the position information of the corner points of the reference target in the two-dimensional target image and the confidence of the vehicle category of the reference target are determined, and the bounding box of the target vehicle is constructed.

[0082] In this embodiment, the position information of the corner points corresponding to all reference targets in the two-dimensional target image and the corresponding vehicle category confidence are first determined, and then the target vehicle can be detected based on the vehicle confidence, which can improve the detection efficiency.

[0083] In an optional embodiment, the method further includes: training the position detection model. The training of the position detection model includes:

[0084] Step S501: Acquire a two-dimensional sample image containing a sample area, wherein the two-dimensional sample image includes a reference sample.

[0085] Step S502: inputting the two-dimensional sample image into the position detection model.

[0086] In this embodiment, the sizes of the two-dimensional sample image and the two-dimensional target image are both 1920x1080, and the position detection model is a CNN 25 network model.

[0087] Step S503: extracting features from the reference sample using the position detection model.

[0088] Step S504: Using the position detection model, a prediction bounding box is constructed based on the sample features, and the prediction category confidence of the reference sample is predicted, wherein the prediction bounding box includes: at least four predicted corner points, and the reference sample is located in a three-dimensional space formed by the at least four predicted corner points.

[0089] Step S505: Compare the position information of the predicted bounding box with the position information of the predetermined reference bounding box to obtain first error information.

[0090] In this embodiment, the first error information further includes: result information of comparing the position information of the predicted mass point determined by the predicted bounding box with the position information of the mass point determined by a predetermined reference bounding box.

[0091] Step S506: Compare the predicted category confidence with a predetermined reference category confidence to obtain second error information.

[0092] In this embodiment, the predetermined reference bounding box position information and the predetermined reference category confidence are both from the KITTI dataset. The first error information and the second error information are both errors obtained using the Euclidean example formula.

[0093] Specifically, the first error information includes the offset between the coordinate values ​​of the corner points of the predicted bounding box and the coordinate values ​​of the corner points of the reference bounding box; the second error information includes the error value between the predicted category confidence and the predetermined reference category confidence.

[0094] Step S507: updating the convolution kernel of the position detection model according to the first error information and the second error information.

[0095] In this embodiment, the convolution kernels in each layer of the CNN 25 network model are updated by the chain derivation rule to complete one iterative training of the CNN 25 network model.

[0096] Step S508: Determine whether the number of updates of the model reaches a threshold. If so, end the training; if not, execute step S501.

[0097] In an optional embodiment, the position detection model includes 18 convolutional layers, 5 maximum pooling layers, 1 average pooling layer and 1 classification output layer, wherein the convolutional layers include: a first convolutional layer and a second convolutional layer, the size of the convolution kernel of the first convolutional layer is larger than the size of the convolution kernel of the second convolutional layer, and the first convolution kernel and the second convolution kernel are convolved alternately in sequence.

[0098] In this embodiment, the experimental environment of the position detection model is the tensorflow framework, wherein the parameters of each layer of the position detection model are shown in Table 1.

[0099] Table 1

[0100] type Number of convolution kernels Size / Step Output Covolutional 32 3x3 224x224 Maxpool 2x2 / 2 112x112 Covolutional 64 3x3 112x112 Maxpool 2x2 / 2 56x56 Covolutional 128 3x3 56x56 Covolutional 64 1x1 56x56 Covolutional 128 3x3 56x56 Maxpool 2x2 / 2 28x28 Covolutional 256 3x3 28x28 Covolutional 128 1x1 28x28 Covolutional 256 3x3 28x28 Maxpool 2x2 / 2 14x14 Covolutional 512 3x3 14x14 Covolutional 256 1x1 14x14 Covolutional 512 3x3 14x14 Covolutional 256 1x1 14x14 Covolutional 512 3x3 14x14 Maxpool 2x2 / 2 7x7 Covolutional 1024 3x3 7x7 Covolutional 512 3x3 7x7 Covolutional 256 1x1 7x7 Covolutional 512 3x3 7x7 Covolutional 1000 1x1 7x7 Avgpool Global 1000 Softmax 20

[0101] Among them, Covolutional is the convolutional layer, Maxpool is the maximum pooling layer, Avgpool is the average pooling layer, and Softmax is the classification output layer. Table 1 shows that the convolutional layer mainly uses a 3x3 convolution kernel. After using a 2x2 maximum pooling layer, the dimension of the corresponding feature map is reduced by two times, while the number of channels of the feature map is increased by two times. Alternating 1x1 convolution layers between 3x3 convolution layers can compress the number of feature maps, thereby reducing the model computation and parameters, and predicting the position information of the reference target in the two-dimensional target image and the category confidence.

[0102] In a second aspect, the present invention provides a method for detecting the position of a vehicle, see Figure 2 , Figure 2 A schematic flow chart of a detection method according to an embodiment of the present application is shown, the method comprising:

[0103] Step S201: Acquire a two-dimensional target image containing a target area, wherein the two-dimensional target image includes a reference target.

[0104] Step S202: inputting the two-dimensional target image into a preset position detection model.

[0105] Step S203: extracting features of the reference target using the position detection model.

[0106] Step S204: When the reference target includes a target vehicle, the position detection model is used to determine the position information of the corner points of the reference target in the two-dimensional target image, the position information of the projection points of the particles, and the confidence level of the vehicle category of the reference target based on the position information of the reference target in the two-dimensional target image, and a bounding box of the target vehicle is constructed.

[0107] The bounding box is formed by connecting lines of corner points; the particle is the geometric center of the bounding box, and the projection point of the particle is the point formed by the positive projection of the particle on the plane where the target area is located.

[0108] Step S205: Determine the positional relationship between the target vehicle and the target area based on the position information of the projection point of the particle and the position information of the target area, and provide a detection result.

[0109] The detection method constructs a three-dimensional bounding box to calibrate the positional relationship of the target vehicle relative to the target area, which can avoid ignoring the misalignment relationship between the target vehicle and the target area due to visual errors on the two-dimensional image. This can improve the accuracy of positioning the target vehicle and effectively reduce the probability of false alarms.

[0110] In practical applications, this detection method only requires a monocular camera to predict the vehicle's three-dimensional position. Compared to existing methods that require ground-mounted sensors, this method offers advantages such as ease of construction, road surface safety, high portability, and low operating costs.

[0111] In a third aspect, the present invention provides a vehicle position detection system 300, see Figure 3 , Figure 3 A schematic structural diagram of a detection system according to an embodiment of the present application is shown, comprising:

[0112] The acquisition module 301 is configured to acquire a two-dimensional target image containing a target area, wherein the two-dimensional target image includes: a reference target;

[0113] An input module 302 is configured to input the two-dimensional target image into a preset position detection model;

[0114] The extraction module 303 is configured to perform feature extraction on the reference target;

[0115] The construction module 304 is configured to, when the reference target includes a target vehicle, construct a bounding box of the target vehicle based on the position information of the target vehicle in the two-dimensional target image, wherein the bounding box includes at least four corner points, and the target vehicle is located in a three-dimensional space formed by the at least four corner points;

[0116] The determination module 305 is configured to determine the positional relationship between the target vehicle and the target area according to the position information of the enclosing frame and the position information of the target area, and provide a detection result.

[0117] In an optional embodiment, the target area is a two-dimensional area;

[0118] The determination module 305 is further configured to determine the positional relationship between the target vehicle and the target area based on the position information of the projection point of the particle and the position information of the target area, wherein the particle is the geometric center of the bounding box, and the projection point of the particle is the point formed by the positive projection of the particle on the plane where the target area is located.

[0119] In an optional embodiment, after extracting features from the reference target, the training module further includes:

[0120] A prediction submodule is configured to predict a category confidence of the reference target, wherein the category confidence includes: a vehicle category confidence, which is used to determine whether a target vehicle exists in the two-dimensional target image;

[0121] The second judgment submodule is configured to judge whether the reference target includes the target vehicle according to the vehicle category confidence.

[0122] In an optional embodiment, the construction submodule is further configured to determine the position information of the corner points of the reference target in the two-dimensional target image and the vehicle category confidence of the reference target based on the position information of the reference target in the two-dimensional target image, and construct a bounding box of the target vehicle.

[0123] In an optional embodiment, the system further includes: a training module; the training module includes:

[0124] The acquisition submodule is configured to acquire a two-dimensional sample image containing a sample area, wherein the two-dimensional sample image includes: a reference sample;

[0125] an input submodule, configured to input the two-dimensional sample image into the position detection model;

[0126] an extraction submodule, configured to perform feature extraction on the reference sample using the position detection model;

[0127] a construction submodule configured to construct a predicted bounding box based on the sample features using the position detection model, and predict a predicted category confidence of the reference sample, wherein the predicted bounding box includes at least four predicted corner points, and the reference sample is located in a three-dimensional space formed by the at least four predicted corner points;

[0128] a first comparison submodule configured to compare the position information of the predicted bounding box with the position information of the predetermined reference bounding box to obtain first error information;

[0129] a second comparison submodule, configured to compare the predicted category confidence with a predetermined reference category confidence to obtain second error information;

[0130] an updating submodule, configured to update a convolution kernel of a position detection model according to the first error information and the second error information;

[0131] The first judgment submodule is configured to judge whether the number of updates of the model reaches a threshold, and if so, terminate the training; if not, execute the acquisition submodule.

[0132] In an optional embodiment, the position detection model includes 18 convolutional layers, 5 maximum pooling layers, 1 average pooling layer and 1 classification output layer, wherein the convolutional layers include: a first convolutional layer and a second convolutional layer, the size of the convolution kernel of the first convolutional layer is larger than the size of the convolution kernel of the second convolutional layer, and the first convolution kernel and the second convolution kernel are convolved alternately in sequence.

[0133] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in the present invention should be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.

Claims

1. A method for detecting the position of a vehicle, characterized in that: include: Acquire a two-dimensional target image containing a target area, wherein the two-dimensional target image includes: a reference target; the target area is a two-dimensional area; Inputting the two-dimensional target image into a preset position detection model; Performing feature extraction on the reference target using the position detection model; In a case where the reference target includes a target vehicle, constructing a bounding box of the target vehicle using the position detection model and based on position information of the target vehicle in the two-dimensional target image, wherein the bounding box includes at least four corner points, and the target vehicle is located in a three-dimensional space formed by the at least four corner points; Determine the positional relationship between the target vehicle and the target area based on the position information of the bounding box and the position information of the target area, and provide a detection result; The method of determining the positional relationship between the target vehicle and the target area based on the position information of the bounding box and the position information of the target area includes: determining the positional relationship between the target vehicle and the target area based on the position information of the projection point of the particle and the position information of the target area, wherein the particle is the geometric center of the bounding box, and the projection point of the particle is the point formed by the orthographic projection of the particle on the plane where the target area is located.

2. The method according to claim 1, characterized in that After extracting features from the reference target, the method further includes: Predicting a category confidence of the reference target, wherein the category confidence includes: a vehicle category confidence, which is used to determine whether a target vehicle exists in the two-dimensional target image; According to the vehicle category confidence, it is determined whether the reference targets include the target vehicle.

3. The method according to claim 2, characterized in that The step of constructing a bounding box of the target vehicle using the position detection model and according to the position information of the target vehicle in the two-dimensional target image includes: Through the position detection model and based on the position information of the reference target in the two-dimensional target image, the position information of the corner points of the reference target in the two-dimensional target image and the confidence of the vehicle category of the reference target are determined, and the bounding box of the target vehicle is constructed.

4. The method according to claim 2, characterized in that The method further comprises: training the position detection model; The training of the position detection model comprises: Step S501: obtaining a two-dimensional sample image containing a sample area, wherein the two-dimensional sample image includes: a reference sample; Step S502: inputting the two-dimensional sample image into the position detection model; Step S503: extracting features from the reference sample using the position detection model; Step S504: constructing a predicted bounding box based on the sample features using the position detection model, and predicting the predicted category confidence of the reference sample, wherein the predicted bounding box includes at least four predicted corner points, and the reference sample is located in a three-dimensional space formed by the at least four predicted corner points; Step S505: Compare the position information of the predicted bounding box with the position information of the predetermined reference bounding box to obtain first error information; Step S506: Compare the predicted category confidence with a predetermined reference category confidence to obtain second error information; Step S507: updating the convolution kernel of the position detection model according to the first error information and the second error information; Step S508: Determine whether the number of updates of the model reaches a threshold. If so, end the training; if not, execute step S501.

5. The method according to claim 1, characterized in that The position detection model includes 18 convolutional layers, 5 maximum pooling layers, 1 average pooling layer and 1 classification output layer, wherein the convolutional layers include: a first convolutional layer and a second convolutional layer, the size of the convolution kernel of the first convolutional layer is larger than the size of the convolution kernel of the second convolutional layer, and the first convolution kernel and the second convolution kernel are convolved alternately in sequence.

6. A vehicle position detection system, characterized in that: include: An acquisition module is configured to acquire a two-dimensional target image containing a target area, wherein the two-dimensional target image includes: a reference target; the target area is a two-dimensional area; an input module, configured to input the two-dimensional target image into a preset position detection model; an extraction module, configured to perform feature extraction on the reference target; a construction module configured to, when the reference target includes a target vehicle, construct a bounding box of the target vehicle based on position information of the target vehicle in the two-dimensional target image, wherein the bounding box includes at least four corner points, and the target vehicle is located in a three-dimensional space formed by the at least four corner points; a determination module configured to determine a positional relationship between the target vehicle and the target area based on the position information of the enclosing frame and the position information of the target area, and provide a detection result; The determination module is further configured to determine the positional relationship between the target vehicle and the target area based on the position information of the projection point of the particle and the position information of the target area, wherein the particle is the geometric center of the bounding box, and the projection point of the particle is the point formed by the positive projection of the particle on the plane where the target area is located.

7. The system according to claim 6, characterized in that The system further comprises: a training module; The training module includes: The acquisition submodule is configured to acquire a two-dimensional sample image containing a sample area, wherein the two-dimensional sample image includes: a reference sample; an input submodule, configured to input the two-dimensional sample image into the position detection model; an extraction submodule, configured to perform feature extraction on the reference sample using the position detection model; a construction submodule configured to construct a predicted bounding box based on the sample features using the position detection model, and predict a predicted category confidence of the reference sample, wherein the predicted bounding box includes at least four predicted corner points, and the reference sample is located in a three-dimensional space formed by the at least four predicted corner points; a first comparison submodule configured to compare the position information of the predicted bounding box with the position information of the predetermined reference bounding box to obtain first error information; a second comparison submodule, configured to compare the predicted category confidence with a predetermined reference category confidence to obtain second error information; an updating submodule, configured to update a convolution kernel of a position detection model according to the first error information and the second error information; The first judgment submodule is configured to judge whether the number of updates of the model reaches a threshold, and if so, terminate the training; if not, execute the acquisition submodule.

8. The system according to claim 6, wherein: The position detection model includes 18 convolutional layers, 5 maximum pooling layers, 1 average pooling layer and 1 classification output layer, wherein the convolutional layers include: a first convolutional layer and a second convolutional layer, the size of the convolution kernel of the first convolutional layer is larger than the size of the convolution kernel of the second convolutional layer, and the first convolution kernel and the second convolution kernel are convolved alternately in sequence.

Citation Information

Patent Citations

  • Lightweight peccancy parking detection device based on full view vision

    CN103824452A