Target positioning method, apparatus and electronic device
By identifying and compensating for the relative orientation and type of truncated targets and using a preset positioning strategy to compensate for the target detection frame, the problem of insufficient vehicle positioning accuracy in target truncation scenarios is solved, achieving higher positioning accuracy and heading angle accuracy.
Patent Information
- Application Number
- CN202310579466.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-22
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2043-05-22
AI Technical Summary
In the target truncation scenario, the deep learning-based 2D target detection technology causes large deviations in the calculation accuracy of the vehicle target position and heading angle. Especially when the vehicle target position in the image is in a truncated state, directly converting the center point of the detection frame to the world coordinate system will produce large deviations.
By acquiring road images captured by roadside cameras, the target detection model is used to perform target detection, identify truncated targets, and based on the relative orientation relationship between the truncated target and the roadside camera and the truncation type, a preset positioning compensation strategy is used to compensate the center position of the target detection frame to improve positioning accuracy.
Improved positioning accuracy in target truncation scenarios, ensuring that the center of the target detection frame is closer to the actual center of the vehicle, and improved the accuracy of target heading angle calculation.
Smart Images

Figure CN116843888B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of automatic driving, and in particular to a target positioning method and device and electronic equipment. BACKGROUND
[0002] Currently, a target positioning scheme based on roadside perception mainly uses a 2D target detection technology based on deep learning technology to detect a vehicle target in an image. After obtaining a 2D target detection frame, a bottom center point or other 2D point of the detection frame is converted to a world coordinate system based on a transformation relationship between the image and the world coordinate system, as an absolute position of the target in the world coordinate system.
[0003] However, if the position of the vehicle target in the image is in a truncated state, as shown in Figure 1 and Figure 2 , a schematic diagram of a target truncated state is provided, and the detected vehicle target is an incomplete target. Then, the position obtained by directly converting the bottom center point of the detection frame to the world coordinate system will have a large deviation from the actual center position of the bottom surface of the vehicle.
[0004] Further, since the heading angle of the target is calculated based on the absolute position of the target, when the target is in a truncated state, with the movement of the target, the bottom center of the detection frame will move horizontally in Figure 1 and Figure 2 , resulting in a large deviation of the calculated heading angle of the target in the world coordinate system. SUMMARY
[0005] Embodiments of the present application provide a target positioning method, device and electronic equipment to improve the target positioning accuracy in a target truncated scenario.
[0006] Embodiments of the present application adopt the following technical solutions:
[0007] In a first aspect, embodiments of the present application provide a target positioning method, wherein the method comprises:
[0008] obtaining a road image collected by a roadside camera, and performing target detection on the road image by using a target detection model to obtain a target detection result, the target detection result comprising a center position of a target detection frame;
[0009] determining whether the target corresponding to the target detection frame is a truncated target according to the target detection result and the road image;
[0010] in a case where the target corresponding to the target detection frame is a truncated target, determining a relative orientation relationship between the truncated target and the roadside camera and a truncated type of the truncated target;
[0011] According to the relative orientation relationship between the truncated target and the roadside camera and the truncation type of the truncated target, a first preset positioning compensation strategy is used to compensate the center position of the target detection frame, to obtain a first target positioning result.
[0012] Optionally, the determining whether the target corresponding to the target detection frame is a truncated target according to the target detection result and the road image comprises:
[0013] According to the relative position relationship between the target detection frame and the image boundary of the road image, determining whether the target corresponding to the target detection frame is a truncated target.
[0014] According to the relative position relationship between the target detection frame and the image boundary of the road image, determining whether the target corresponding to the target detection frame is a truncated target.
[0015] Optionally, the determining whether the target corresponding to the target detection frame is a truncated target according to the relative position relationship between the target detection frame and the image boundary of the road image comprises:
[0016] If the relative position relationship between the target detection frame and the image boundary of the road image is that the relative distance between the target detection frame and the image boundary of the road image is less than a preset distance threshold, it is determined that the target corresponding to the target detection frame has a truncated target.
[0017] Otherwise, it is determined that the target corresponding to the target detection frame is a non-truncated target.
[0018] Optionally, the determining the relative orientation relationship between the truncated target and the roadside camera and the truncation type of the truncated target in the case that the target corresponding to the target detection frame is a truncated target comprises:
[0019] Obtaining a historical heading angle of the truncated target and a current orientation of the roadside camera, the historical heading angle being a heading angle before the truncated target is truncated;
[0020] According to the historical heading angle of the truncated target and the current orientation of the roadside camera, determining the relative orientation relationship between the truncated target and the roadside camera;
[0021] According to the relative orientation relationship between the truncated target and the roadside camera and the relative position relationship between the target detection frame and the image boundary of the road image, determining the truncation type of the truncated target.
[0022] Optionally, the determining the truncation type of the truncated target according to the relative orientation relationship between the truncated target and the roadside camera and the relative position relationship between the target detection frame and the image boundary of the road image comprises:
[0023] If the relative orientation relationship between the cut-off target and the roadside camera is that the cut-off target and the roadside camera are oriented in opposite directions, and the relative position relationship between the target detection frame and the image boundary of the road image is that the target detection frame of the cut-off target is located at the left boundary of the road image, it is determined that the cut-off type of the cut-off target is that the tail of the left-side driving-in target is cut off.
[0024] If the relative orientation relationship between the cut-off target and the roadside camera is that the cut-off target and the roadside camera are oriented in the same direction, and the relative position relationship between the target detection frame and the image boundary of the road image is that the target detection frame of the cut-off target is located at the right boundary of the road image, it is determined that the cut-off type of the cut-off target is that the tail of the right-side driving-in target is cut off.
[0025] If the relative orientation relationship between the cut-off target and the roadside camera is that the cut-off target and the roadside camera are oriented in the same direction, and the relative position relationship between the target detection frame and the image boundary of the road image is that the target detection frame of the cut-off target is located at the left boundary of the road image, it is determined that the cut-off type of the cut-off target is that the head of the left-side driving-out target is cut off.
[0026] If the relative orientation relationship between the cut-off target and the roadside camera is that the cut-off target and the roadside camera are oriented in opposite directions, and the relative position relationship between the target detection frame and the image boundary of the road image is that the target detection frame of the cut-off target is located at the right boundary of the road image, it is determined that the cut-off type of the cut-off target is that the head of the right-side driving-out target is cut off.
[0027] Otherwise, it is determined that the cut-off type of the cut-off target is that the side of the vehicle is cut off.
[0028] Optionally, the first preset position compensation strategy is used to compensate the center position of the target detection frame according to the relative orientation relationship between the cut-off target and the roadside camera and the cut-off type of the cut-off target, to obtain a first target positioning result.
[0029] If the cut-off type of the cut-off target is any one of the tail of the left-side driving-in target being cut off, the tail of the right-side driving-in target being cut off, the head of the left-side driving-out target being cut off, and the head of the right-side driving-out target being cut off, the center position of the target detection frame is compensated by a first preset distance in a first preset direction according to the transformation relationship between the image coordinate system and the world coordinate system.
[0030] If the cut-off type of the cut-off target is that the side of the vehicle is cut off, the center position of the target detection frame is compensated by a second preset distance in a second preset direction according to the transformation relationship between the image coordinate system and the world coordinate system.
[0031] Optionally, the target detection result further comprises a bottom edge center position of the target detection frame, and after determining whether the target corresponding to the target detection frame is a truncated target according to the target detection result and the road image, the method further comprises:
[0032] in a case where the target corresponding to the target detection frame is a non-truncated target, obtaining a current orientation of the roadside camera and a historical heading angle of the non-truncated target;
[0033] determining a relative orientation relationship between the non-truncated target and the roadside camera according to the current orientation of the roadside camera and the historical heading angle of the non-truncated target;
[0034] compensating the bottom edge center position of the target detection frame according to the relative orientation relationship between the non-truncated target and the roadside camera by using a second preset positioning compensation strategy to obtain a second target positioning result.
[0035] Optionally, the compensating the bottom edge center position of the target detection frame according to the relative orientation relationship between the non-truncated target and the roadside camera by using a second preset positioning compensation strategy to obtain a second target positioning result comprises:
[0036] if the relative orientation relationship between the non-truncated target and the roadside camera is that the front of the non-truncated target faces the roadside camera or that the tail of the non-truncated target faces the roadside camera, compensating the bottom edge center position of the target detection frame by a third preset distance in a third preset direction according to a transformation relationship between an image coordinate system and a world coordinate system;
[0037] if the relative orientation relationship between the non-truncated target and the roadside camera is that the side of the non-truncated target faces the roadside camera, compensating the bottom edge center position of the target detection frame by a fourth preset distance in a fourth preset direction according to the transformation relationship between the image coordinate system and the world coordinate system.
[0038] In a second aspect, the embodiments of the present application further provide a target positioning device, wherein the device comprises:
[0039] a target detection unit configured to acquire a road image collected by a roadside camera, and perform target detection on the road image by using a target detection model to obtain a target detection result, the target detection result comprising a center position of a target detection frame;
[0040] a first determination unit configured to determine whether a target corresponding to the target detection frame is a truncated target according to the target detection result and the road image;
[0041] a second determination unit configured to, in a case where the target corresponding to the target detection frame is a truncated target, determine a relative orientation relationship between the truncated target and the roadside camera and a truncated type of the truncated target;
[0042] The first compensation unit is configured to compensate the center position of the target detection frame according to the relative orientation relationship between the truncated target and the roadside camera and the truncation type of the truncated target by using a first preset position compensation strategy, to obtain a first target positioning result.
[0043] In a third aspect, the embodiments of the present application further provide an electronic device, comprising:
[0044] a processor; and
[0045] a memory arranged to store computer-executable instructions that, when executed, cause the processor to perform any of the aforementioned methods.
[0046] In a fourth aspect, the embodiments of the present application further provide a computer-readable storage medium storing one or more programs, which, when executed by an electronic device comprising a plurality of applications, cause the electronic device to perform any of the aforementioned methods.
[0047] The above at least one technical solution adopted by the embodiments of the present application can achieve the following beneficial effects: the target positioning method of the embodiments of the present application first acquires a road image collected by a roadside camera, and performs target detection on the road image by using a target detection model to obtain a target detection result, the target detection result including a center position of a target detection frame; then determines whether there is a truncated target in the road image according to the target detection result and the road image; after that, in the case that there is a truncated target in the road image, determines the relative orientation relationship between the truncated target and the roadside camera and the truncation type of the truncated target; finally, according to the relative orientation relationship between the truncated target and the roadside camera and the truncation type of the truncated target, compensates the center position of the target detection frame by using a first preset position compensation strategy, to obtain a first target positioning result. The target positioning method of the embodiments of the present application compensates the center position of the detection frame of the incomplete target truncated in the image based on the 2D target detection result, and finally obtains a position closer to the actual center of the vehicle, thereby improving the positioning accuracy under the target truncation condition. BRIEF DESCRIPTION OF DRAWINGS
[0048] The accompanying drawings, which are included to provide a further understanding of the present application, constitute a part of the present application and illustrate the illustrative embodiments of the present application and their description serve to explain the present application, and do not constitute improper limitations on the present application. In the drawings:
[0049] Figure 1 is a schematic diagram of a target truncation state;
[0050] Figure 2 is a schematic diagram of another target truncation state;
[0051] Figure 3 FIG. 1 is a flowchart of a target positioning method according to an embodiment of the present application;
[0052] Figure 4 FIG. 2 is a schematic diagram of several truncation types of a truncated target according to an embodiment of the present application;
[0053] Figure 5 FIG. 3 is a flowchart of a target positioning method according to an embodiment of the present application;
[0054] Figure 6 FIG. 4 is a structural diagram of a target positioning device according to an embodiment of the present application;
[0055] Figure 7 FIG. 5 is a structural diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0056] In order to make the objectives, technical solutions and advantages of the present application clearer, the technical solutions of the present application will be described below in detail with reference to the embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of protection of the present application.
[0057] The technical solutions provided by the embodiments of the present application will be described in detail below with reference to the drawings.
[0058] The embodiments of the present application provide a target positioning method, as shown in FIG. 1, a flowchart of a target positioning method according to an embodiment of the present application is provided, and the method at least includes the following steps S310 to S340: Figure 3
[0059] In step S310, a road image collected by a roadside camera is acquired, and a target detection model is used to perform target detection on the road image to obtain a target detection result, wherein the target detection result includes the center position of a target detection frame.
[0060] The target positioning method according to the embodiments of the present application can be executed by a roadside device. When performing target positioning, a road image collected by a roadside camera is first acquired, and then a target detection model trained in advance is used to detect a vehicle target in the road image to obtain a target detection result. The target detection model can be trained based on an existing convolutional neural network such as the YOLO series network. How to train the target detection model can be determined flexibly by those of ordinary skill in the art in combination with the prior art, and is not limited specifically herein.
[0061] The target detection result output by the target detection model mainly includes the position coordinates of the bottom center of the target detection frame and the center position coordinates of the target detection frame. In the embodiment of the present application, considering the case of target truncation, the target position calculated based on the bottom center position of the detection frame will have a large deviation. Therefore, the center position coordinates of the target detection frame are mainly used in the embodiment of the present application. In the case where the vehicle target is truncated, the center position of the target detection frame after being projected to the ground will be closer to the bottom center of the vehicle head, the bottom center of the vehicle tail or the bottom center of the vehicle side, so that it is easier to take a compensation strategy for compensation subsequently.
[0062] In step S320, it is determined whether the target corresponding to the target detection frame is a truncated target according to the target detection result and the road image.
[0063] According to each target detection frame detected in the target detection result, in combination with the image boundary of the road image, it can be further determined whether the target corresponding to each target detection frame is a truncated target, and then different compensation strategies are taken for positioning compensation.
[0064] In step S330, in the case where the target corresponding to the target detection frame is a truncated target, the relative orientation relationship between the truncated target and the roadside camera and the truncation type of the truncated target are determined.
[0065] If there is a truncated target in the current road image, it is necessary to further determine the relative orientation relationship between the truncated target and the roadside camera and the truncation type of the truncated target, because the relative orientation between the truncated target and the roadside camera is different, for example, whether it is driving towards the camera or driving away from the camera, and the specific truncation type of the truncated target is different, for example, whether the vehicle head is truncated or the vehicle tail is truncated, which will affect the specific compensation strategy taken subsequently.
[0066] In step S340, according to the relative orientation relationship between the truncated target and the roadside camera and the truncation type of the truncated target, the center position of the target detection frame is compensated by using a first preset positioning compensation strategy to obtain a first target positioning result.
[0067] After determining the relative orientation relationship between the truncated target and the roadside camera and the truncation type of the truncated target, the positioning compensation strategy currently taken can be determined. The core of the positioning compensation strategy is to compensate the center position of the target detection frame to the actual bottom center position of the vehicle, that is, to obtain a target positioning result closer to the real position of the vehicle, thereby improving the applicability of the 2D target detection result.
[0068] The target positioning method of the embodiments of the present application compensates the center position of the detection box of the incomplete target truncated in the image based on the 2D target detection result, finally obtains a position closer to the actual center of the vehicle, and improves the positioning accuracy in the case of target truncation.
[0069] In some embodiments of the present application, the determining whether the target corresponding to the target detection box is a truncated target according to the target detection result and the road image comprises: determining the relative position relationship between the target detection box and the image boundaries of the road image according to the target detection box and the image boundaries of the road image; and determining whether the target corresponding to the target detection box is a truncated target according to the relative position relationship between the target detection box and the image boundaries of the road image.
[0070] When determining whether there is a truncated target in the road image, the relative position relationship between the target detection box and each image boundary of the road image can be determined. The relative position relationship is mainly used to reflect whether the position of the target detection box is close to any image boundary. If the position of the target detection box is close to any image boundary, it means that the target detection box is at the position of the image boundary, and it is highly probable to consider that the target corresponding to the target detection box is a truncated target. If the position of the target detection box is not close to any image boundary, it can be considered that the target corresponding to the target detection box is a non-truncated target.
[0071] In some embodiments of the present application, the determining whether the target corresponding to the target detection box is a truncated target according to the relative position relationship between the target detection box and the image boundaries of the road image comprises: if the relative position relationship between the target detection box and the image boundaries of the road image is that the relative distance between the target detection box and the image boundaries of the road image is less than a preset distance threshold, it is determined that the target corresponding to the target detection box is a truncated target; otherwise, it is determined that the target corresponding to the target detection box is a non-truncated target.
[0072] For example, if the distance between the minimum value of the horizontal coordinate of the corner point of the target detection box and the left boundary of the road image is less than a preset distance threshold, it means that the target detection box is closer to the left boundary of the image. If the distance between the maximum value of the horizontal coordinate of the corner point of the target detection box and the right boundary of the road image is less than a preset distance threshold, it means that the target detection box is closer to the right boundary of the image. If the distance between the minimum value of the vertical coordinate of the corner point of the target detection box and the upper boundary of the road image is less than a preset distance threshold, it means that the target detection box is closer to the upper boundary of the image. If the distance between the maximum value of the vertical coordinate of the corner point of the target detection box and the lower boundary of the road image is less than a preset distance threshold, it means that the target detection box is closer to the lower boundary of the image.
[0073] The above several cases can be regarded as the target corresponding to the target detection frame being a truncated target, and other cases can be considered as the target corresponding to the target detection frame being a non-truncated target.
[0074] In some embodiments of the present application, in the case that the target corresponding to the target detection frame is a truncated target, determining the relative orientation relationship between the truncated target and the roadside camera and the truncation type of the truncated target comprises: obtaining a historical heading angle of the truncated target and a current orientation of the roadside camera, the historical heading angle being a heading angle before the truncated target is truncated; determining the relative orientation relationship between the truncated target and the roadside camera according to the historical heading angle of the truncated target and the current orientation of the roadside camera; and determining the truncation type of the truncated target according to the relative orientation relationship between the truncated target and the roadside camera and the relative positional relationship between the target detection frame and the image boundary of the road image.
[0075] The heading angle of the target reflects the orientation of the target in the world coordinate system. Since the heading angle of the target is mainly calculated based on the absolute position of the target in two frames of data, and the absolute position of the target in the current frame has not been determined, it is considered that the heading angle of the target will not change greatly in a short time, so the historical heading angle of the target before being truncated can be regarded as the current heading angle of the truncated target.
[0076] The orientation of the roadside camera reflects the shooting angle or shooting direction of the roadside camera in the world coordinate system, so by comparing the heading angle of the truncated target and the orientation of the roadside camera, the orientation of the truncated target relative to the roadside camera is determined, that is, the orientation of the truncated target from the perspective of the roadside camera, for example, the same, opposite or between the heading angle of the car head and the orientation of the roadside camera.
[0077] After determining the relative orientation relationship between the truncated target and the roadside camera, the specific truncation type of the truncated target can be further determined in combination with the relative positional relationship between the target detection frame of the truncated target and the image boundary of the road image, for example, the tail of the left-side driving-in target being truncated, the tail of the right-side driving-in target being truncated, the head of the left-side driving-out target being truncated, the head of the right-side driving-out target being truncated, the side of the car being truncated, etc. Of course, how to define the truncation type can be flexibly determined in combination with the actual road scene and the actual shooting angle of the roadside camera, which is not limited here.
[0078] In some embodiments of the present application, the determining the truncation type of the truncated target according to the relative orientation relationship between the truncated target and the roadside camera and the relative position relationship between the target detection frame and the image boundary of the road image comprises: if the relative orientation relationship between the truncated target and the roadside camera is that the truncated target and the roadside camera are opposite in orientation, and the relative position relationship between the target detection frame and the image boundary of the road image is that the target detection frame of the truncated target is located at the left boundary of the road image, determining that the truncation type of the truncated target is that the tail of the left-side driving-in target is truncated; if the relative orientation relationship between the truncated target and the roadside camera is that the truncated target and the roadside camera are the same in orientation, and the relative position relationship between the target detection frame and the image boundary of the road image is that the target detection frame of the truncated target is located at the right boundary of the road image, determining that the truncation type of the truncated target is that the tail of the right-side driving-in target is truncated; if the relative orientation relationship between the truncated target and the roadside camera is that the truncated target and the roadside camera are the same in orientation, and the relative position relationship between the target detection frame and the image boundary of the road image is that the target detection frame of the truncated target is located at the left boundary of the road image, determining that the truncation type of the truncated target is that the head of the left-side driving-out target is truncated; if the relative orientation relationship between the truncated target and the roadside camera is that the truncated target and the roadside camera are opposite in orientation, and the relative position relationship between the target detection frame and the image boundary of the road image is that the target detection frame of the truncated target is located at the right boundary of the road image, determining that the truncation type of the truncated target is that the head of the right-side driving-out target is truncated; otherwise, determining that the truncation type of the truncated target is that the side of the vehicle is truncated.
[0079] In view of the truncation conditions that may occur more frequently in actual road scenes, the truncation types defined in the embodiments of the present application mainly include the tail of the left-side driving-in target being truncated, the tail of the right-side driving-in target being truncated, the head of the left-side driving-out target being truncated, the head of the right-side driving-out target being truncated, and the side of the vehicle being truncated, as shown in the schematic diagrams of the truncation types of several truncated targets in the embodiments of the present application. Figure 4
[0080] If the orientation of the truncated target and the roadside camera is opposite, and the target detection frame of the detected truncated target is closer to the left boundary of the road image, it can be determined that the truncation type of the truncated target is that the tail of the left-side driving-in target is truncated, as shown in (1) of FIG. 17. Figure 4 If the orientation of the truncated target and the roadside camera is the same, and the target detection frame of the detected truncated target is closer to the right boundary of the road image, it can be determined that the truncation type of the truncated target is that the tail of the right-side driving-in target is truncated, as shown in (2) of FIG. 17. Figure 4 If the truncated target is in the same direction as the orientation of the roadside camera, and the detected target detection box of the truncated target is closer to the left boundary of the road image, it can be determined that the truncated type of the truncated target is that the head of the left side driving out target is truncated, as shown in FIG. 3 (3). Figure 4 If the truncated target is in the opposite direction of the orientation of the roadside camera, and the detected target detection box of the truncated target is closer to the right boundary of the road image, it can be determined that the truncated type of the truncated target is that the head of the right side driving out target is truncated, as shown in FIG. 3 (4). Figure 4 In addition, it can be considered that the truncated type of the truncated target is that the side of the vehicle is truncated, as shown in FIG. 3 (5) and (6). Figure 4 Figure 4
[0081] It should be noted that the orientation of the truncated target in the embodiments of the present application can be determined according to the driving direction of the target. The driving direction can be determined according to the tracking position of multiple frames of vehicle targets. If there are identifiable road elements such as arrow marks on the road surface, the driving direction can also be determined by recognizing the arrow marks, or the driving direction of the vehicle can also be determined based on the existing convolution network to train the head / tail detection model to detect the head / tail. Of course, how to determine it specifically, those skilled in the art can choose flexibly according to actual needs, which is not limited here.
[0082] In some embodiments of the present application, the first preset positioning compensation strategy is used to compensate the center position of the target detection box according to the relative orientation relationship between the truncated target and the roadside camera and the truncated type of the truncated target, to obtain a first target positioning result, which includes: if the truncated type of the truncated target is any one of the tail of the left side driving in target being truncated, the tail of the right side driving in target being truncated, the head of the left side driving out target being truncated, the head of the right side driving out target being truncated, the center position of the target detection box is compensated by a first preset distance in a first preset direction according to the transformation relationship between the image coordinate system and the world coordinate system; if the truncated type of the truncated target is that the side of the vehicle is truncated, the center position of the target detection box is compensated by a second preset distance in a second preset direction according to the transformation relationship between the image coordinate system and the world coordinate system.
[0083] Based on the above embodiment, if the truncation type of the truncation target is that the front of the vehicle is truncated or the rear of the vehicle is truncated, it can specifically include the rear of the vehicle entering the target from the left being truncated, the rear of the vehicle entering the target from the right being truncated, the front of the vehicle exiting the target from the left being truncated, and the front of the vehicle exiting the target from the right being truncated. These situations all indicate that the center position of the target detection frame is projected to the ground based on the transformation relationship between the image coordinate system and the world coordinate system. The center position of the vehicle bottom is about half a vehicle length away from the actual center position. Therefore, for these situations, according to the specific truncation type, the projection position of the center position of the target detection frame on the ground can be compensated by a first preset distance in a first preset direction.
[0084] The first preset direction refers to the direction of compensation, which can include, for example, the same direction as the camera or the opposite direction. If the cutoff target is in the opposite direction to the roadside camera and the rear end of the vehicle entering the target from the left is cutoff, compensation needs to be made in the same direction as the camera; if the cutoff target is in the same direction as the roadside camera and the rear end of the vehicle entering the target from the right is cutoff, compensation needs to be made in the opposite direction to the camera; if the cutoff target is in the same direction as the roadside camera and the front end of the vehicle exiting the target from the left is cutoff, compensation needs to be made in the same direction as the camera; if the cutoff target is in the opposite direction to the roadside camera and the front end of the vehicle exiting the target from the right is cutoff, compensation needs to be made in the opposite direction to the camera. The first preset distance refers to the compensation distance, which can be, for example, about half the length of the vehicle in the embodiment of the present application.
[0085] If the truncation type of the truncation target is that the side of the vehicle is truncated, it means that the center position of the target detection frame is projected to the ground based on the transformation relationship between the image coordinate system and the world coordinate system. The center position of the vehicle bottom is about half a vehicle width away from the actual center position. Therefore, in this case, the projection position of the center position of the target detection frame on the ground can be compensated by a second preset distance in a second preset direction.
[0086] The second preset direction also refers to the direction of compensation, and can include, for example, the same direction as the camera or the opposite direction. If the left side of the vehicle body is cut off, compensation needs to be made in the same direction as the camera. If the right side of the vehicle body is cut off, compensation needs to be made in the opposite direction of the camera. The second preset distance also refers to the compensation distance, and in this embodiment of the application, for example, can be about half the width of the vehicle.
[0087] In some embodiments of the present application, the target detection result further includes a bottom edge center position of the target detection frame, and after determining whether the target corresponding to the target detection frame is a truncated target according to the target detection result and the road image, the method further includes: in the case that the target corresponding to the target detection frame is a non-truncated target, obtaining a current orientation of the roadside camera and a historical heading angle of the non-truncated target; determining a relative orientation relationship between the non-truncated target and the roadside camera according to the current orientation of the roadside camera and the historical heading angle of the non-truncated target; and compensating the bottom edge center position of the target detection frame according to the relative orientation relationship between the non-truncated target and the roadside camera by using a second preset positioning compensation strategy to obtain a second target positioning result.
[0088] If the target corresponding to the target detection frame is a non-truncated target, i.e., a complete vehicle target can be detected in the road image, then a second preset positioning compensation strategy can be adopted to compensate the bottom edge center position of the target detection frame at this time. Specifically, the relative orientation relationship between the non-truncated target and the roadside camera can be determined according to the current orientation of the roadside camera and the historical heading angle of the non-truncated target, and then the bottom edge center position of the target detection frame is compensated to the position of the center of the vehicle bottom surface based on the relative orientation relationship between the non-truncated target and the roadside camera by using the second preset positioning compensation strategy, so as to obtain the positioning result of the non-truncated target.
[0089] In some embodiments of the present application, the compensation of the bottom edge center position of the target detection frame according to the relative orientation relationship between the non-truncated target and the roadside camera by using the second preset positioning compensation strategy to obtain the second target positioning result includes: if the relative orientation relationship between the non-truncated target and the roadside camera is that the front of the non-truncated target faces the roadside camera or that the tail of the non-truncated target faces the roadside camera, then the bottom edge center position of the target detection frame is compensated by a third preset distance in a third preset direction according to the transformation relationship between the image coordinate system and the world coordinate system; and if the relative orientation relationship between the non-truncated target and the roadside camera is that the side of the non-truncated target faces the roadside camera, then the bottom edge center position of the target detection frame is compensated by a fourth preset distance in a fourth preset direction according to the transformation relationship between the image coordinate system and the world coordinate system.
[0090] For a non-truncated target, if the orientation of the vehicle relative to the roadside camera is that the front or the tail of the vehicle is oriented towards the roadside camera, it means that from the perspective of the roadside camera, the projection position of the bottom center of the target detection box is usually close to the bottom center of the front or the tail of the vehicle, so the absolute position of the bottom center of the target detection box deviates from the actual bottom center position of the target by a distance of about half the length of the vehicle in the opposite direction of the camera orientation, and the compensation strategy adopted at this time can be to compensate the projection position of the bottom center of the target detection box obtained based on the transformation relationship between the image coordinate system and the world coordinate system by a distance of about half the length of the vehicle in the same direction of the camera orientation, so as to obtain a position close to the actual bottom center of the target.
[0091] If the orientation type of the vehicle relative to the roadside camera is the side of the vehicle body, it means that from the perspective of the roadside camera, the projection position of the bottom center of the target detection box is usually close to the bottom center of the side of the vehicle body, so the projection position of the bottom center of the target detection box deviates from the actual bottom center position of the target by a distance of about half the width of the vehicle in the opposite direction of the camera orientation, and the compensation strategy adopted at this time can be to compensate the projection position of the bottom center of the target detection box obtained based on the transformation relationship between the image coordinate system and the world coordinate system by a distance of about half the width of the vehicle in the same direction of the camera orientation, so as to obtain a position close to the actual bottom center of the target.
[0092] That is, for the setting of the compensation direction, from the perspective of the roadside camera, no matter what type of orientation the target has relative to the roadside camera, the absolute position of the bottom center of the target detection box is closer to the roadside camera than the actual bottom center position of the target, so the type of orientation of the target relative to the roadside camera has little effect on the setting of the compensation direction, and the compensation direction can be uniformly set to move in the same direction as the orientation of the roadside camera.
[0093] In order to facilitate the understanding of the embodiments of the present application, as shown in Figure 5 As shown in FIG. 1, a target positioning process according to an embodiment of the present application is provided. First, a road image collected by a roadside camera is obtained, then a target detection model is used for target detection to obtain a target detection result, then it is determined whether there is a truncated target in the road image according to the target detection result and the road image, and finally if the target corresponding to the target detection box is a truncated target, a first preset positioning compensation strategy is adopted to compensate the center position of the target detection box according to the relative orientation relationship between the truncated target and the roadside camera and the truncation type of the truncated target, so as to obtain the positioning result of the truncated target. If the target corresponding to the target detection box is a non-truncated target, a second preset positioning compensation strategy is adopted to compensate the bottom center position of the target detection box according to the relative orientation relationship between the non-truncated target and the roadside camera, so as to obtain the positioning result of the non-truncated target.
[0094] The target positioning process of the embodiment of the application compensates for the position of the incomplete target truncated in the image based on the 2D target detection result, finally obtains a position closer to the actual center of the vehicle, improves the positioning accuracy in the case of target truncation, and further ensures the accuracy of subsequent target heading angle calculation.
[0095] The embodiment of the application further provides a target positioning device 6, as shown in Figure 6 The structure diagram of the target positioning device in the embodiment of the application is provided, and the device 600 at least includes: a target detection unit 610, a first determination unit 620, a second determination unit 630 and a first compensation unit 640, wherein:
[0096] The target detection unit 610 is configured to acquire a road image collected by a roadside camera, and perform target detection on the road image by using a target detection model to obtain a target detection result, wherein the target detection result includes the center position of a target detection frame.
[0097] The first determination unit 620 is configured to determine whether the target corresponding to the target detection frame is a truncated target according to the target detection result and the road image.
[0098] The second determination unit 630 is configured to determine the relative orientation relationship between the truncated target and the roadside camera and the truncation type of the truncated target in the case that the target corresponding to the target detection frame is a truncated target.
[0099] The first compensation unit 640 is configured to compensate the center position of the target detection frame by using a first preset positioning compensation strategy according to the relative orientation relationship between the truncated target and the roadside camera and the truncation type of the truncated target, to obtain a first target positioning result.
[0100] In some embodiments of the application, the first determination unit 620 is specifically configured to: determine the relative position relationship between the target detection frame and the image boundary of the road image according to the target detection frame and the image boundary of the road image; and determine whether the target corresponding to the target detection frame is a truncated target according to the relative position relationship between the target detection frame and the image boundary of the road image.
[0101] In some embodiments of the application, the first determination unit 620 is specifically configured to: if the relative position relationship between the target detection frame and the image boundary of the road image is that the relative distance between the target detection frame and the image boundary of the road image is less than a preset distance threshold, it is determined that the target corresponding to the target detection frame is a truncated target; otherwise, it is determined that the target corresponding to the target detection frame is a non-truncated target.
[0102] In some embodiments of the present application, the second determining unit 630 is specifically configured to: acquire a historical heading angle of the truncated target and a current orientation of the roadside camera, the historical heading angle being a heading angle of the truncated target before being truncated; determine a relative orientation relationship between the truncated target and the roadside camera according to the historical heading angle of the truncated target and the current orientation of the roadside camera; and determine a truncation type of the truncated target according to the relative orientation relationship between the truncated target and the roadside camera and a relative positional relationship between the target detection frame and the image boundary of the road image.
[0103] In some embodiments of the present application, the second determining unit 630 is specifically configured to: if the relative orientation relationship between the truncated target and the roadside camera is that the truncated target and the roadside camera are oriented in opposite directions, and the relative positional relationship between the target detection frame and the image boundary of the road image is that the target detection frame of the truncated target is located at the left boundary of the road image, determine that the truncation type of the truncated target is that the tail of the left-side driving-in target is truncated; if the relative orientation relationship between the truncated target and the roadside camera is that the truncated target and the roadside camera are oriented in the same direction, and the relative positional relationship between the target detection frame and the image boundary of the road image is that the target detection frame of the truncated target is located at the right boundary of the road image, determine that the truncation type of the truncated target is that the tail of the right-side driving-in target is truncated; if the relative orientation relationship between the truncated target and the roadside camera is that the truncated target and the roadside camera are oriented in the same direction, and the relative positional relationship between the target detection frame and the image boundary of the road image is that the target detection frame of the truncated target is located at the left boundary of the road image, determine that the truncation type of the truncated target is that the head of the left-side driving-out target is truncated; if the relative orientation relationship between the truncated target and the roadside camera is that the truncated target and the roadside camera are oriented in opposite directions, and the relative positional relationship between the target detection frame and the image boundary of the road image is that the target detection frame of the truncated target is located at the right boundary of the road image, determine that the truncation type of the truncated target is that the head of the right-side driving-out target is truncated; otherwise, determine that the truncation type of the truncated target is that the side of the vehicle is truncated.
[0104] In some embodiments of the present application, the first compensation unit 640 is specifically configured to: if the truncation type of the truncated target is any one of the tail of the left-side driving-in target being truncated, the tail of the right-side driving-in target being truncated, the head of the left-side driving-out target being truncated, and the head of the right-side driving-out target being truncated, compensate the center position of the target detection frame by a first preset distance in a first preset direction according to a transformation relationship between the image coordinate system and the world coordinate system; and if the truncation type of the truncated target is that the side of the vehicle is truncated, compensate the center position of the target detection frame by a second preset distance in a second preset direction according to the transformation relationship between the image coordinate system and the world coordinate system.
[0105] In some embodiments of the present application, the target detection result further comprises a bottom edge center position of the target detection frame, and the device further comprises: an acquisition unit configured to, in a case where the target corresponding to the target detection frame is a non-truncated target, acquire a current orientation of the roadside camera and a historical heading angle of the non-truncated target; a third determination unit configured to determine a relative orientation relationship between the non-truncated target and the roadside camera according to the current orientation of the roadside camera and the historical heading angle of the non-truncated target; and a second compensation unit configured to compensate the bottom edge center position of the target detection frame according to the relative orientation relationship between the non-truncated target and the roadside camera by using a second preset positioning compensation strategy to obtain a second target positioning result.
[0106] In some embodiments of the present application, the second compensation unit is specifically configured to: if the relative orientation relationship between the non-truncated target and the roadside camera is that a front of the non-truncated target faces the roadside camera or that a tail of the non-truncated target faces the roadside camera, compensate the bottom edge center position of the target detection frame by a third preset distance in a third preset direction according to a transformation relationship between an image coordinate system and a world coordinate system; and if the relative orientation relationship between the non-truncated target and the roadside camera is that a side of the non-truncated target faces the roadside camera, compensate the bottom edge center position of the target detection frame by a fourth preset distance in a fourth preset direction according to the transformation relationship between the image coordinate system and the world coordinate system.
[0107] It can be understood that the above target positioning device can realize each step of the target positioning method provided in the foregoing embodiments, and the related explanations about the target positioning method are all applicable to the target positioning device, which will not be described herein again.
[0108] Figure 7 is a structural schematic diagram of an electronic device according to an embodiment of the present application. Please refer to Figure 7 At the hardware level, the electronic device comprises a processor, and optionally further comprises an internal bus, a network interface, and a memory. The memory can include a memory such as a random-access memory (RAM), and can also include a non-volatile memory such as at least one disk memory. Of course, the electronic device can also include other hardware required by a business.
[0109] The processor, the network interface and the memory can be connected with each other through an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 7 Only one bidirectional arrow is used to represent the bus, but it does not mean that there is only one bus or only one type of bus.
[0110] The memory is used to store programs. Specifically, the program can include program code including computer operation instructions. The memory can include an internal memory and a non-volatile memory, and provide instructions and data for the processor.
[0111] The processor reads the corresponding computer program from the non-volatile memory into the internal memory and then runs, and forms the target positioning device at a logical level. The processor executes the program stored in the memory, and is specifically used for executing the following operations:
[0112] Obtain a road image collected by a roadside camera, and perform target detection on the road image by using a target detection model to obtain a target detection result, the target detection result including a center position of a target detection frame;
[0113] According to the target detection result and the road image, determine whether a target corresponding to the target detection frame is a truncated target;
[0114] In the case where the target corresponding to the target detection frame is a truncated target, determine a relative orientation relationship between the truncated target and the roadside camera and a truncation type of the truncated target;
[0115] According to the relative orientation relationship between the truncated target and the roadside camera and the truncation type of the truncated target, compensate the center position of the target detection frame by using a first preset positioning compensation strategy to obtain a first target positioning result.
[0116] The above as described in the present application Figure 1The method performed by the target positioning apparatus disclosed in the embodiments shown can be applied in a processor or implemented by the processor. The processor can be an integrated circuit chip with processing capability. In the implementation process, the steps of the method can be completed by integrated logic circuits in the processor or instructions in the form of software. The processor mentioned above can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; or can be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The disclosed methods, steps and logic block diagrams in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as a hardware code processor for execution, or a combination of hardware and software modules in the code processor for execution. The software module can be located in a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium in the art. The storage medium is located in the memory, and the processor reads the information in the memory, and combines the hardware to complete the steps of the method.
[0117] The electronic device can also execute Figure 1 The method performed by the target positioning apparatus in the embodiments shown, and implement the functions of the target positioning apparatus in Figure 1 the embodiments shown. The embodiments of the present application will not be described here.
[0118] The embodiments of the present application also propose a computer readable storage medium storing one or more programs, the one or more programs including instructions that, when executed by an electronic device including a plurality of applications, can enable the electronic device to execute Figure 1 The method performed by the target positioning apparatus in the embodiments shown, and specifically for executing:
[0119] Obtaining a road image collected by a roadside camera, and performing target detection on the road image by using a target detection model to obtain a target detection result, the target detection result including a center position of a target detection frame;
[0120] Determining, according to the target detection result and the road image, whether a target corresponding to the target detection frame is a truncated target.
[0121] In a case where the target corresponding to the target detection frame is a truncated target, a relative orientation relationship between the truncated target and the roadside camera and a truncation type of the truncated target are determined;
[0122] According to the relative orientation relationship between the truncated target and the roadside camera and the truncation type of the truncated target, a center position of the target detection frame is compensated by using a first preset positioning compensation strategy, to obtain a first target positioning result.
[0123] Those skilled in the art will understand that embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage, etc.) containing computer-usable program code.
[0124] The present application is described with reference to flowcharts and / or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, as well as combinations of flows and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing apparatus to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing apparatus produce an apparatus that implements the functions specified in the flowcharts and / or block diagrams. Figure 1 one or more flows and / or blocks Figure 1 means for performing the functions specified in the flowchart
[0125] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including instruction means, which implements the functions specified in the flowcharts and / or block diagrams. Figure 1 one or more flows and / or blocks Figure 1 means for performing the functions specified in the flowchart
[0126] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus, so that a series of operation steps are performed on the computer or other programmable data processing apparatus to produce a computer-implemented process, so that the instructions executed on the computer or other programmable data processing apparatus provide a process for implementing the functions specified in the flowcharts and / or block diagrams. Figure 1 one or more flows and / or blocks Figure 1 means for performing the functions specified in the flowchart
[0127] In one typical arrangement, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
[0128] The memory can include non-persistent memory and / or volatile memory, such as random access memory (RAM) and / or cache memory, non-volatile memory, such as read-only memory (ROM), EPROM, and / or flash memory, etc. The memory is an example of computer readable media.
[0129] Computer readable media includes permanent and non-permanent, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile discs (DVDs) or other optical storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible to a computing device. According to the definition herein, computer readable media does not include transitory media, such as modulated data signals and carrier waves.
[0130] It should also be noted that the terms "comprising," "including," and any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can also include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element preceded by "comprises a" does not, without more constraints, foreclose the existence of additional identical elements in the process, method, article, or apparatus that includes the recited element.
[0131] Those skilled in the art will appreciate that embodiments of the present application can be devised for a method, a system, or a computer program product. Accordingly, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application can take the form of a computer program product on one or more computer readable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage devices, etc.) embodying computer readable program code.
[0132] The above merely provides an example of the present application, and is not intended to limit the present application. Any modification, equivalent replacement, improvement, etc. within the spirit and principle of the present application should be included in the scope of claims of the present application.
Claims
1. A target positioning method, wherein: The method comprises: Obtaining a road image captured by a roadside camera, and performing target detection on the road image using a target detection model to obtain a target detection result, wherein the target detection result includes a center position of a target detection frame; determining whether the target corresponding to the target detection frame is a truncated target according to the target detection result and the road image; When the target corresponding to the target detection frame is a truncated target, determining a relative orientation relationship between the truncated target and the roadside camera and a truncation type of the truncated target; According to the relative orientation relationship between the truncated target and the roadside camera and the truncation type of the truncated target, a first preset positioning compensation strategy is used to compensate the center position of the target detection frame to obtain a first target positioning result.
2. The method according to claim 1, wherein: Determining whether the target corresponding to the target detection frame is a truncated target according to the target detection result and the road image includes: determining a relative positional relationship between the target detection frame and the image boundary of the road image according to the target detection frame and the image boundary of the road image; Whether the target corresponding to the target detection frame is a truncated target is determined according to a relative positional relationship between the target detection frame and an image boundary of the road image.
3. The method according to claim 2, wherein: The determining, based on the relative positional relationship between the target detection frame and the image boundary of the road image, whether the target corresponding to the target detection frame is a truncated target includes: If the relative positional relationship between the target detection frame and the image boundary of the road image is such that the relative distance between the target detection frame and the image boundary of the road image is less than a preset distance threshold, determining that the target corresponding to the target detection frame is a truncated target; Otherwise, it is determined that the target corresponding to the target detection frame is a non-truncated target.
4. The method according to claim 2, wherein: When the target corresponding to the target detection frame is a truncated target, determining the relative orientation relationship between the truncated target and the roadside camera and the truncation type of the truncated target includes: Obtaining a historical heading angle of the truncated target and a current orientation of a roadside camera, wherein the historical heading angle is the heading angle of the truncated target before being truncated; Determining a relative orientation relationship between the truncated target and the roadside camera based on a historical heading angle of the truncated target and a current orientation of the roadside camera; The truncation type of the truncation target is determined according to the relative orientation relationship between the truncation target and the roadside camera and the relative position relationship between the target detection frame and the image boundary of the road image.
5. The method according to claim 4, wherein: The determining of the truncation type of the truncation target according to the relative orientation relationship between the truncation target and the roadside camera and the relative position relationship between the target detection frame and the image boundary of the road image includes: If the relative orientation relationship between the truncated target and the roadside camera is that the truncated target and the roadside camera are in opposite directions, and the relative position relationship between the target detection frame and the image boundary of the road image is that the target detection frame of the truncated target is located at the left boundary of the road image, then the truncation type of the truncated target is determined to be that the rear end of the vehicle entering from the left is truncated; If the relative orientation relationship between the truncated target and the roadside camera is that the truncated target and the roadside camera are in the same orientation, and the relative position relationship between the target detection frame and the image boundary of the road image is that the target detection frame of the truncated target is located at the right boundary of the road image, then the truncation type of the truncated target is determined to be that the rear end of the vehicle entering from the right is truncated; If the relative orientation relationship between the truncated target and the roadside camera is that the truncated target and the roadside camera are in the same orientation, and the relative position relationship between the target detection frame and the image boundary of the road image is that the target detection frame of the truncated target is located at the left boundary of the road image, then the truncation type of the truncated target is determined to be that the front of the vehicle exiting the target on the left side is truncated; If the relative orientation relationship between the truncated target and the roadside camera is that the truncated target and the roadside camera are in opposite directions, and the relative position relationship between the target detection frame and the image boundary of the road image is that the target detection frame of the truncated target is located at the right boundary of the road image, then the truncation type of the truncated target is determined to be that the front of the vehicle exiting the target on the right side is truncated; Otherwise, it is determined that the truncation type of the truncation target is that the vehicle side is truncation.
6. The method of claim 1, wherein: The compensating the center position of the target detection frame using a first preset positioning compensation strategy according to the relative orientation relationship between the truncated target and the roadside camera and the truncation type of the truncated target to obtain a first target positioning result includes: If the truncation type of the truncation target is any one of the following: the rear end of the vehicle entering the target from the left is truncation, the rear end of the vehicle entering the target from the right is truncation, the front end of the vehicle exiting the target from the left is truncation, and the front end of the vehicle exiting the target from the right is truncation, then according to the transformation relationship between the image coordinate system and the world coordinate system, the center position of the target detection frame is compensated by a first preset distance in a first preset direction; If the truncation type of the truncation target is that the side of the vehicle is truncation, the center position of the target detection frame is compensated by a second preset distance in a second preset direction according to the transformation relationship between the image coordinate system and the world coordinate system.
7. The method of claim 1, wherein: The target detection result also includes a bottom edge center position of the target detection frame. After determining whether the target corresponding to the target detection frame is a truncated target based on the target detection result and the road image, the method further includes: When the target corresponding to the target detection frame is a non-truncated target, obtaining the current orientation of the roadside camera and the historical heading angle of the non-truncated target; Determining a relative orientation relationship between the non-truncated object and the roadside camera according to the current orientation of the roadside camera and the historical heading angle of the non-truncated object; According to the relative orientation relationship between the non-truncated target and the roadside camera, a second preset positioning compensation strategy is used to compensate the bottom center position of the target detection frame to obtain a second target positioning result.
8. The method of claim 7, wherein: The second target positioning result is obtained by compensating the bottom center position of the target detection frame using a second preset positioning compensation strategy based on the relative orientation relationship between the non-truncated target and the roadside camera, including: If the relative orientation relationship between the non-truncated target and the roadside camera is that the front of the non-truncated target is facing the roadside camera or the rear of the non-truncated target is facing the roadside camera, then based on the transformation relationship between the image coordinate system and the world coordinate system, the bottom edge center position of the target detection frame is compensated by a third preset distance in a third preset direction; If the relative orientation relationship between the non-truncated target and the roadside camera is that the side of the vehicle body of the non-truncated target is facing the roadside camera, then according to the transformation relationship between the image coordinate system and the world coordinate system, the bottom edge center position of the target detection frame is compensated by a fourth preset distance in a fourth preset direction.
9. A target positioning device, wherein: The device comprises: A target detection unit is configured to obtain a road image captured by a roadside camera and perform target detection on the road image using a target detection model to obtain a target detection result, wherein the target detection result includes a center position of a target detection frame; a first determining unit, configured to determine whether the target corresponding to the target detection frame is a truncated target based on the target detection result and the road image; a second determining unit, configured to determine, when the target corresponding to the target detection frame is a truncated target, a relative orientation relationship between the truncated target and the roadside camera and a truncation type of the truncated target; The first compensation unit is used to compensate the center position of the target detection frame using a first preset positioning compensation strategy according to the relative orientation relationship between the truncated target and the roadside camera and the truncation type of the truncated target to obtain a first target positioning result.
10. An electronic device comprising: processor; as well as A memory arranged to store computer executable instructions, which when executed cause the processor to perform the method of any one of claims 1 to 8.
Citation Information
Patent Citations
Monocular three-dimensional object detection method and device based on decoupling truncation object
CN112712062A
Image-based vehicle positioning method and device, storage medium and electronic equipment
CN113075716A