Target state recognition method, device, equipment, storage medium and vehicle
By identifying target tracking boxes and other tracking boxes in road images during intelligent driving, the relative positional relationship between targets and other targets is determined, solving the problem of the limited number of state types in action recognition models and improving recognition accuracy and safety.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-15
- Publication Date
- 2026-03-31
AI Technical Summary
In existing technologies, motion recognition models can only identify a limited range of pedestrian or cyclist states, resulting in low accuracy and failing to meet the needs of intelligent driving.
By acquiring road images of the target vehicle's driving direction, a target detection model is used to identify target tracking boxes and other tracking boxes in the road images. The relative positional relationship between the target and other targets is determined based on pixel coordinates, and the target's state is determined based on the relative positional relationship.
The number of target states has been increased, the accuracy of target state recognition has been improved, more target state information has been provided for intelligent driving, and safety has been enhanced.
Smart Images

Figure CN115690729B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of image recognition technology, and in particular to a target state recognition method, apparatus, device, storage medium, and vehicle. Background Technology
[0002] Recognizing the status of pedestrians or cyclists on the road is crucial in intelligent driving. Vehicles can determine their next driving action based on the status of pedestrians or cyclists, ensuring driving safety.
[0003] Currently, the main method for identifying pedestrians or cyclists is through motion recognition models. However, the motion recognition models primarily identify pedestrian or cyclist states such as walking speed and direction, resulting in a limited range of states and low accuracy, which is insufficient to meet the current needs of intelligent driving. Summary of the Invention
[0004] To address the aforementioned technical problems, this disclosure provides a target state recognition method, apparatus, device, storage medium, and vehicle.
[0005] A first aspect of this disclosure provides a target state recognition method, the method comprising:
[0006] Acquire road images in the direction the target vehicle is traveling;
[0007] Based on the target detection model, road images are identified to obtain the target tracking boxes of the targets in the road images and the tracking boxes of other targets outside the targets, including pedestrians and cyclists;
[0008] Based on the pixel coordinates of the target tracking box and other tracking boxes in the road image, determine the relative positional relationship between the target and other targets;
[0009] The state of the target is determined based on the correspondence between relative position and state.
[0010] A second aspect of this disclosure provides a target state recognition device, the device comprising:
[0011] The first acquisition module is used to acquire road images in the direction of travel of the target vehicle;
[0012] The recognition module is used to identify road images based on the target detection model, and obtain the target tracking box of the target in the road image and the tracking boxes of other targets, including pedestrians and cyclists.
[0013] The first determining module is used to determine the relative positional relationship between the target and other targets based on the pixel coordinates of the target tracking box and other tracking boxes in the road image;
[0014] The second determining module is used to determine the state of the target based on the correspondence between relative positional relationships and states.
[0015] A third aspect of this disclosure provides a vehicle-mounted terminal, which includes a memory and a processor. The memory stores a computer program, and when the computer program is executed by the processor, it can implement the target state recognition method of the first aspect described above.
[0016] A fourth aspect of this disclosure provides a computer-readable storage medium storing a computer program that, when executed by a processor, can implement the target state recognition method of the first aspect described above.
[0017] A fifth aspect of this disclosure provides a vehicle that includes the vehicle-mounted terminal described in the third aspect.
[0018] The technical solution provided in this disclosure has the following advantages compared with the prior art:
[0019] This embodiment of the disclosure acquires a road image of the target vehicle's driving direction; identifies the road image based on a target detection model to obtain the target tracking box of the target in the road image and other tracking boxes of other targets besides the target, including pedestrians and cyclists; determines the relative positional relationship between the target and other targets based on the pixel coordinates of the target tracking box and other tracking boxes in the road image; and determines the state of the target based on the correspondence between the relative positional relationship and the state. This allows for the determination of multiple different states of the target based on various relative positional relationships between the target and other targets besides the target, increasing the types of target states, improving the accuracy of target state recognition, providing more target state information for intelligent driving, and enhancing the safety of intelligent driving. Attached Figure Description
[0020] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0021] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0022] Figure 1 This is a flowchart of a target state recognition method provided in an embodiment of this disclosure;
[0023] Figure 2This is a flowchart of another target state recognition method provided in this embodiment of the disclosure;
[0024] Figure 3 This is a flowchart of yet another target state recognition method provided in this disclosure embodiment;
[0025] Figure 4 This is a flowchart of another target state recognition method provided in the embodiments of this disclosure;
[0026] Figure 5 This is a schematic diagram of the structure of a target state recognition device provided in an embodiment of this disclosure;
[0027] Figure 6 This is a schematic diagram of the structure of a vehicle-mounted terminal provided in an embodiment of this disclosure. Detailed Implementation
[0028] To better understand the above-mentioned objectives, features, and advantages of this disclosure, the solutions disclosed herein will be further described below. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other.
[0029] Numerous specific details are set forth in the following description in order to provide a full understanding of this disclosure, but this disclosure may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only some, and not all, of the embodiments of this disclosure.
[0030] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.
[0031] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0032] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0033] Recognizing the status of pedestrians or cyclists on the road is crucial in intelligent driving. Vehicles can determine their next driving action based on the status of pedestrians or cyclists, ensuring driving safety. Currently, the status of pedestrians or cyclists is mainly obtained by recognizing images using motion recognition models. However, the status of pedestrians or cyclists identified by motion recognition models mainly includes walking speed and walking direction, resulting in a relatively limited range of statuses and low accuracy, which can no longer meet the current needs of intelligent driving.
[0034] To address the shortcomings of related technologies in pedestrian and cyclist state recognition, embodiments of this disclosure provide a target state recognition method, apparatus, device, storage medium, and vehicle. This method can determine multiple different states of a target based on various relative positional relationships between the target and other targets, increasing the types of target states, improving the accuracy of target state recognition, providing more target state information for intelligent driving, and enhancing the safety of intelligent driving.
[0035] The target state recognition method provided in this disclosure can be executed by an in-vehicle terminal. The in-vehicle terminal can be understood as any device with processing and computing capabilities, which can be used to control various parameters of the vehicle to enable intelligent driving.
[0036] To better understand the inventive concept of the embodiments of this disclosure, the technical solutions of the embodiments of this disclosure will be described below in conjunction with exemplary embodiments.
[0037] Figure 1 This is a flowchart of a target state recognition method provided in an embodiment of this disclosure, such as... Figure 1 As shown, the target state recognition method provided in this embodiment may include steps 110-140:
[0038] Step 110: Obtain a road image showing the direction the target vehicle is traveling.
[0039] In this embodiment of the disclosure, the target vehicle is equipped with an on-board camera, which can capture road images in the direction the target vehicle is traveling. The on-board terminal in the target vehicle can obtain the road images in the direction the target vehicle is traveling from the on-board camera.
[0040] Step 120: Based on the target detection model, identify the road image to obtain the target tracking box of the target in the road image and other tracking boxes of other targets, including pedestrians and cyclists.
[0041] The targets in this embodiment include pedestrians and cyclists. A cyclist can be understood as a person pushing or riding a non-motorized vehicle. The pedestrian tracking box can be understood as the smallest outer rectangle of the pedestrian in the image. The cyclist tracking box can be understood as the smallest outer rectangle of the cyclist in the image. Other tracking boxes can be understood as the smallest outer rectangle of other targets in the image besides the target. Other targets can be, for example, other pedestrians, other cyclists, other objects, lanes, other vehicles, target vehicles, etc. Other objects can include fences, buildings, traffic lights, traffic signs, vegetation, terrain, parking poles, ground locks, pillars, etc.
[0042] In this embodiment of the disclosure, the target detection model can be understood as a convolutional neural network that can identify pedestrians, cyclists and other targets in road images, and assign a pedestrian tracking box to each pedestrian, a cyclist tracking box to each cyclist and other tracking boxes to other targets.
[0043] In this embodiment of the disclosure, after the vehicle-mounted terminal acquires a road image, it can input the road image into a target detection model. The target detection model can identify pedestrians, cyclists, and other targets in the road image, and assign a pedestrian tracking box to each pedestrian, a cyclist tracking box to each cyclist, and other tracking boxes to other targets. The pedestrian tracking box and the cyclist tracking box are target tracking boxes.
[0044] Step 130: Determine the relative positional relationship between the target and other targets based on the pixel coordinates of the target tracking box and other tracking boxes in the road image.
[0045] In this embodiment of the disclosure, pixel coordinates can be understood as the coordinates of each pixel in the image coordinate system of the road image.
[0046] In this embodiment of the present disclosure, after obtaining the target tracking box and other tracking boxes, the vehicle terminal can determine the relative positional relationship between the target and other targets based on the pixel coordinates of the target tracking box and other tracking boxes in the road image.
[0047] Step 140: Determine the state of the target based on the correspondence between relative position and state.
[0048] In this embodiment of the disclosure, the vehicle-mounted terminal stores a correspondence between relative positional relationships and states. After obtaining the relative positional relationship between a target and other targets, the vehicle-mounted terminal can determine the state corresponding to the relative positional relationship based on the correspondence between the relative positional relationship and the state, and determine the state corresponding to the relative positional relationship as the state of the target. For example, when the target's position is behind other targets, the state of the target can be determined as the target being occluded by the other target, etc.
[0049] This embodiment of the disclosure acquires a road image of the target vehicle's driving direction; identifies the road image based on a target detection model to obtain the target tracking box of the target in the road image and other tracking boxes of other targets besides the target, including pedestrians and cyclists; determines the relative positional relationship between the target and other targets based on the pixel coordinates of the target tracking box and other tracking boxes in the road image; and determines the state of the target based on the correspondence between the relative positional relationship and the state. This allows for the determination of multiple different states of the target based on various relative positional relationships between the target and other targets besides the target, increasing the types of target states, improving the accuracy of target state recognition, providing more target state information for intelligent driving, and enhancing the safety of intelligent driving.
[0050] Figure 2 This is a flowchart of a target state recognition method provided in an embodiment of this disclosure, such as... Figure 2 As shown, the target state recognition method provided in this embodiment may include steps 210-250:
[0051] Step 210: Obtain a road image showing the direction of travel of the target vehicle.
[0052] Step 220: Based on the target detection model, identify the road image to obtain the target tracking box of the target in the road image and other tracking boxes of other targets, including pedestrians and cyclists.
[0053] Steps 210-220 in this embodiment can refer to the content of steps 110-120 above, and will not be repeated here.
[0054] Step 230: Determine the size of the target tracking box and other tracking boxes in the road image based on their pixel coordinates.
[0055] In this embodiment of the disclosure, the vehicle terminal can determine the size of the target tracking box and other tracking boxes in the road image based on the pixel coordinates of the target tracking box and other tracking boxes in the road image. The size may include the height and width of the tracking box, but is not limited thereto.
[0056] Step 240: Compare the size of the target tracking box with the size of other tracking boxes to determine the relative positional relationship between the target and other targets. The relative positional relationship between the target and other targets may include at least one of the following: the target is behind other cyclists, the target is behind other objects, the target is behind other vehicles, the target is within the lane, or the target is relative to the target vehicle. The relative positional relationship between the target and the target vehicle may include at least one of the following: the target is close to the front of the target vehicle, or the target is at a distance from the target vehicle.
[0057] In this embodiment of the disclosure, other targets may include at least one of the following: other pedestrians, other cyclists, other objects, lanes, other vehicles, and the target vehicle. After obtaining the dimensions of the target tracking box and other tracking boxes in the road image, the vehicle-mounted terminal can compare the dimensions of the target tracking box with the dimensions of the other tracking boxes to determine the relative positional relationship between the target and other targets.
[0058] The relative positional relationship between the target and other targets in the embodiments of this disclosure may include at least one of the following: the target is behind other cyclists, the target is behind other objects, the target is behind other vehicles, the target is within the lane, and the relative positional relationship between the target and the target vehicle. The relative positional relationship between the target and the target vehicle may include at least one of the following: the target is close to the front of the target vehicle, and the target is at a distance from the target vehicle.
[0059] Specifically, comparing the size of the target tracking frame with the sizes of other tracking frames to determine the target's position after other cyclists can include steps 2401-2403:
[0060] Step 2401: Based on the size of the target tracking box and the size of other cyclist tracking boxes, calculate the area of the target tracking box and the area of other cyclist tracking boxes.
[0061] Other cyclist tracking frames in this embodiment can be understood as tracking frames for cyclists other than the target cyclist.
[0062] In this embodiment of the disclosure, the vehicle terminal can calculate the area of the target tracking frame and the area of the other cyclist tracking frames by multiplying the height and width of each tracking frame based on the size of the target tracking frame and the size of the other cyclist tracking frames.
[0063] Step 2402: Calculate the first ratio of the area of other cyclists' tracking frames to the area of the target tracking frame.
[0064] In this embodiment of the disclosure, after obtaining the area of the target tracking frame and the areas of other cyclist tracking frames, the vehicle terminal can calculate a first ratio between the area of the other cyclist tracking frames and the area of the target tracking frame.
[0065] Step 2403: If the first ratio is greater than the first preset ratio threshold, then the target's position is determined to be behind other cyclists.
[0066] In this embodiment of the present disclosure, if the first ratio of the area of the tracking frame of other cyclists to the area of the target tracking frame is greater than a first preset ratio threshold, the vehicle terminal can determine that the target's position is behind the other cyclists. The first preset ratio threshold can be set as needed and is not specifically limited here.
[0067] Specifically, comparing the size of the target tracking bounding box with the sizes of other tracking bounding boxes to determine that the target's position is behind other objects can include steps 2411-2413:
[0068] Step 2411: Based on the size of the target tracking box and the size of the object tracking boxes of other objects, determine the width of the target tracking box and the width of the object tracking box.
[0069] In this embodiment of the present disclosure, the vehicle terminal can determine the width of the target tracking box based on the size of the target tracking box, and determine the width of the object tracking box based on the size of the object tracking box of other objects.
[0070] Step 2412: Calculate the second ratio of the width of the object tracking box to the width of the target tracking box.
[0071] In this embodiment of the disclosure, after obtaining the width of the target tracking box and the width of the object tracking box, the vehicle terminal can calculate a second ratio between the width of the object tracking box and the width of the target tracking box.
[0072] Step 2413: If the second ratio is greater than the second preset ratio threshold, then the target's position is determined to be behind the object.
[0073] In this embodiment of the present disclosure, if the second ratio of the width of the object tracking box to the width of the target tracking box is greater than a second preset ratio threshold, the vehicle terminal can determine that the target's position is behind the object. The second preset ratio threshold can be set as needed and is not specifically limited here.
[0074] Specifically, comparing the size of the target tracking bounding box with the sizes of other tracking bounding boxes to determine the target's position after other vehicles can include steps 2421-2423:
[0075] Step 2421: Based on the size of the target tracking box and the sizes of other vehicle tracking boxes, determine the height and width of the target tracking box and the height and width of other vehicle tracking boxes.
[0076] In this embodiment of the disclosure, the vehicle terminal can determine the height and width of the target tracking frame based on the size of the target tracking frame, and determine the height and width of the tracking frames of other vehicles based on the size of the tracking frames of other vehicles.
[0077] Step 2422: Calculate the third ratio of the height of other vehicle tracking frames to the height of the target tracking frame, and the fourth ratio of the width of other vehicle tracking frames to the width of the target tracking frame.
[0078] In this embodiment of the disclosure, after obtaining the height and width of the target tracking frame and the height and width of other vehicle tracking frames, the vehicle terminal can calculate a third ratio of the height of other vehicle tracking frames to the height of the target tracking frame and a fourth ratio of the width of other vehicle tracking frames to the width of the target tracking frame.
[0079] Step 2423: If the third ratio is greater than 0 and the fourth ratio is greater than the third preset ratio threshold, then the target's position is determined to be behind other vehicles.
[0080] In this embodiment of the present disclosure, if the third ratio of the height of other vehicle tracking frames to the height of the target tracking frame is greater than 0, and the fourth ratio of the width of other vehicle tracking frames to the width of the target tracking frame is a third preset ratio threshold, then the vehicle terminal can determine that the target's position is behind other vehicles. The third preset ratio threshold can be set as needed and is not specifically limited here.
[0081] Specifically, comparing the size of the target tracking bounding box with the sizes of other tracking bounding boxes to determine that the target's position is not within the lane can include steps 2431-2432:
[0082] Step 2431: Based on the size of the target tracking box and the size of the lane, calculate the width of the target tracking box outside the lane and the width of the lane.
[0083] In this embodiment of the present disclosure, the vehicle terminal can determine the width of the target tracking frame based on the size of the target tracking frame, determine the width of the lane based on the size of the lane, and then subtract the width of the target tracking frame from the width of the target tracking frame inside the lane to obtain the width of the target tracking frame outside the lane.
[0084] Step 2432: If the fifth ratio between the width of the target tracking box outside the lane and the width of the lane is greater than the fourth preset ratio threshold, then it is determined that the target is not in the lane.
[0085] In this embodiment of the present disclosure, if the fifth ratio between the width of the target tracking frame outside the lane and the width of the lane is greater than the fourth preset ratio threshold, the vehicle terminal can determine that the target's position is not within the lane. The fourth preset ratio threshold can be set as needed and is not specifically limited here.
[0086] Specifically, comparing the size of the target tracking bounding box with the sizes of other tracking bounding boxes to determine the relative positional relationship between the target and the target vehicle may include steps 2441-2442:
[0087] Step 2441: Project and transform the pixel coordinates of the target tracking box in the road image to the vehicle coordinate system of the target vehicle to obtain the projected coordinates of the target tracking box in the vehicle coordinate system.
[0088] The vehicle coordinate system in this embodiment can be understood as a coordinate system used to describe the motion of the target vehicle. Its origin coincides with the center of mass of the target vehicle. When the target vehicle is stationary on a horizontal road, the X-axis is parallel to the ground and points in front of the target vehicle, the Z-axis passes through the center of mass of the target vehicle and points upward, and the Y-axis points to the left side of the driver's seat.
[0089] In this embodiment of the present disclosure, the vehicle terminal can project and transform the pixel coordinates of the target tracking box in the road image to the vehicle coordinate system of the target vehicle to obtain the projected coordinates of the target tracking box in the vehicle coordinate system.
[0090] Step 2442: Based on the projected coordinates of the target tracking box in the vehicle coordinate system, determine the relative positional relationship between the target and the target vehicle. The relative positional relationship between the target and the target vehicle includes at least one of the following: the target is close to the front of the target vehicle, or the target is at a distance from the target vehicle.
[0091] In this embodiment of the present disclosure, the vehicle terminal can determine the relative positional relationship between the target and the target vehicle based on the projection coordinates of the target tracking frame in the vehicle coordinate system. The relative positional relationship between the target and the vehicle can include at least one of the following: the target is close to the front of the target vehicle, or the target is at a distance from the target vehicle.
[0092] In some embodiments, determining that the target is close to the front of the target vehicle based on the projected coordinates of the target tracking box in the vehicle coordinate system may include steps 244201-244203:
[0093] Step 244201: Based on the distance between the external tangent plane of the front of the target vehicle and the centroid of the target vehicle, calculate the longitudinal coordinate of the front of the target vehicle in the vehicle coordinate system.
[0094] In this embodiment of the disclosure, the vehicle terminal can calculate the position of the front of the target vehicle in the vehicle coordinate system based on the distance between the external tangent plane of the front of the target vehicle and the centroid of the target vehicle.
[0095] Step 244202: Based on the projected coordinates of the target tracking box, calculate the distance between the target tracking box and the longitudinal coordinates of the vehicle front in the vehicle coordinate system.
[0096] In this embodiment of the present disclosure, the vehicle terminal can determine the longitudinal projection coordinates of the target tracking frame in the vehicle coordinate system based on the projection coordinates of the target tracking frame, and then calculate the distance between the longitudinal projection coordinates of the target tracking frame and the longitudinal coordinates of the vehicle front in the vehicle coordinate system to obtain the distance between the target tracking frame and the longitudinal coordinates of the vehicle front in the vehicle coordinate system.
[0097] Step 244203: If the distance between the target tracking box and the longitudinal coordinate of the vehicle's front is less than the first preset distance threshold, then it is determined that the target is close to the front of the target vehicle.
[0098] In this embodiment of the present disclosure, if the distance between the target tracking frame and the longitudinal coordinate of the vehicle's front end in the vehicle coordinate system is less than a first preset distance threshold, the vehicle terminal can determine that the target is approaching the front end of the target vehicle. The first preset distance threshold can be set according to actual needs and is not specifically limited here.
[0099] In some embodiments, determining the distance of the target from the target vehicle based on the projected coordinates of the target tracking box in the vehicle coordinate system may include steps 244211-244214:
[0100] Step 244211: Based on the distance between the external tangent plane of the target vehicle's front end and the target vehicle's center of mass, calculate the longitudinal coordinate of the target vehicle's front end in the vehicle coordinate system.
[0101] The content of this embodiment can be referred to step 244201 above, and will not be repeated here.
[0102] Step 244212: Based on the projected coordinates of the target tracking box, determine the projected coordinates of the midpoint of the upper boundary of the target tracking box.
[0103] In this embodiment of the disclosure, the target tracking box can be divided into an upper boundary, a lower boundary, a left boundary, and a right boundary. The vehicle terminal can determine the projection coordinates of the midpoint of the upper boundary of the target tracking box based on the projection coordinates of the target tracking box.
[0104] Step 244213: Calculate the longitudinal distance between the projected coordinates of the midpoint of the upper boundary and the longitudinal coordinates of the front of the vehicle.
[0105] In this embodiment of the present disclosure, after obtaining the projected coordinates of the midpoint of the upper boundary of the target tracking frame and the longitudinal coordinates of the vehicle front, the vehicle terminal can calculate the longitudinal distance between the projected coordinates of the midpoint of the upper boundary and the longitudinal coordinates of the vehicle front.
[0106] Step 244214: If the longitudinal distance is greater than the second preset distance threshold, then the target is determined to be at a distance from the target vehicle. In this embodiment of the present disclosure, if the longitudinal distance between the projected coordinates of the midpoint of the upper boundary and the longitudinal coordinates of the vehicle front is greater than the second preset distance threshold, the vehicle terminal can determine that the target is at a distance from the target vehicle. The distance from the target vehicle can be understood as a position far away from the target vehicle. The second preset distance threshold can be set as needed and is not specifically limited here.
[0107] Step 250: If the target is behind other cyclists, the target's state is determined to be that the target is obscured by other cyclists; if the target is behind other objects, the target's state is determined to be that the target is obscured by other objects; if the target is behind other vehicles, the target's state is determined to be that the target is obscured by other vehicles; if the target is within the lane, the target's state is determined to be that the target is within the lane; if the target is close to the front of the target vehicle, the target's state is determined to be that the target is close to the front of the target vehicle; if the target is far away from the target vehicle, the target's state is determined to be that the target is far away from the target vehicle.
[0108] In this embodiment of the present disclosure, if the target is behind other cyclists, the vehicle terminal can determine that the target is obscured by other cyclists; if the target is behind other objects, the vehicle terminal can determine that the target is obscured by other objects; if the target is behind other vehicles, the vehicle terminal can determine that the target is obscured by other vehicles; if the target is within the lane, the vehicle terminal can determine that the target is within the lane; if the target is close to the front of the target vehicle, the vehicle terminal can determine that the target is close to the front of the target vehicle; if the target is at a distance from the target vehicle, the vehicle terminal can determine that the target is far from the target vehicle.
[0109] Therefore, based on the various relative positional relationships between the target and other targets, multiple different states of the target can be determined, increasing the types of target states, improving the accuracy of target state recognition, providing more target state information for intelligent driving, and enhancing the safety of intelligent driving.
[0110] In some embodiments of this disclosure, step 2423 above, if the third ratio is greater than 0 and the fourth ratio is greater than the third preset ratio threshold, then determining the target's position after other vehicles may include:
[0111] If the third ratio is greater than or equal to 1 and the fourth ratio is greater than the third preset ratio threshold, the vehicle terminal can determine that the target is entirely behind other vehicles; if the third ratio is between 0.5 and 1 and the fourth ratio is greater than the third preset ratio threshold, the vehicle terminal can determine that the target is mostly behind other vehicles; if the third ratio is greater than 0 and less than 0.5, and the fourth ratio is greater than the third preset ratio threshold, the vehicle terminal can determine that the target is partially behind other vehicles.
[0112] If the target is entirely behind other vehicles, the vehicle terminal can determine that the target is completely obscured by other vehicles; if the target is mostly behind other vehicles, the vehicle terminal can determine that the target is partially obscured by other vehicles; if the target is only partially behind other vehicles, the vehicle terminal can determine that the target is only partially obscured by other vehicles.
[0113] This allows us to determine the extent to which a target is obscured by other vehicles, thereby improving the accuracy of target status recognition.
[0114] Figure 3 This is a flowchart of a target state recognition method provided in an embodiment of this disclosure, such as... Figure 3 As shown, the target state recognition method provided in this embodiment may include steps 310-380:
[0115] Step 310: Obtain a road image showing the direction of travel of the target vehicle.
[0116] Step 320: Based on the target detection model, identify the road image to obtain the target tracking box of the target in the road image and other tracking boxes of other targets, including pedestrians and cyclists.
[0117] Steps 310-320 in this embodiment can refer to the content of steps 110-120 above, and will not be repeated here.
[0118] Step 330: Based on the pixel coordinates of the target tracking box in the road image, determine the left distance between the left boundary of the target tracking box and the left edge of the road image, and the right distance between the right boundary of the target tracking box and the right edge of the road image.
[0119] In this embodiment of the present disclosure, the vehicle terminal can determine the distance between the left boundary of the target tracking box and the left edge of the road image, and the distance between the right boundary of the target tracking box and the right edge of the road image, based on the pixel coordinates of the target tracking box in the road image.
[0120] Step 330: If the left distance or right distance is less than the third preset distance threshold, then the target tracking box is determined to be at the edge of the road image.
[0121] In this embodiment of the present disclosure, if the left distance or the right distance is less than a third preset distance threshold, the vehicle terminal can determine that the target tracking box is located at the edge of the road image. The third preset distance threshold can be set as needed and is not specifically limited here.
[0122] Step 350: Obtain the historical frame image corresponding to the road image.
[0123] In this embodiment of the disclosure, the historical frame images corresponding to the road images can be understood as multiple frames of road images prior to the time the road image was acquired. The vehicle terminal can store road images within a certain time period, and the vehicle terminal can retrieve the historical frame images corresponding to the road images from the storage space.
[0124] Step 360: Determine the target's walking direction based on road images and historical frame images.
[0125] In this embodiment of the present disclosure, the vehicle terminal can identify the target's movement in each frame of the image based on the road image and the corresponding historical frame image, and obtain the target's walking direction.
[0126] Step 370: If the angle between the target's walking direction and the target vehicle's driving direction is between 0 and 180 degrees, then the target's walking direction and the target vehicle's driving direction are determined to intersect.
[0127] In this embodiment of the disclosure, if the angle between the walking direction of the target and the driving direction of the target vehicle is between 0 and 180 degrees, the vehicle terminal can determine that the walking direction of the target intersects with the driving direction of the target vehicle.
[0128] Step 380: If the target's walking direction intersects with the target vehicle's driving direction, then the target's state is determined as the target entering the screen.
[0129] In this embodiment of the disclosure, if the target's walking direction intersects with the vehicle's driving direction, the vehicle terminal can determine the target's state as a target cut-in screen. The target cut-in screen can indicate that the target's future walking route is on the target vehicle's driving route, and the target vehicle needs to slow down or avoid it in advance to ensure the target's safety.
[0130] In some other embodiments of this disclosure, after determining the target's state based on relative positional relationships, the vehicle-mounted terminal can further calculate the aspect ratio of the cyclist tracking frame based on the pixel coordinates of the cyclist tracking frame in the road image; if the aspect ratio is greater than a preset ratio, the cyclist's state is determined to be a crossing state. Here, the crossing state can be understood as the cyclist's walking direction being approximately perpendicular to the vehicle's driving direction, indicating that the cyclist may be crossing the road. The preset ratio can be any real number greater than 0 and can be set according to actual needs; no specific limitation is made here.
[0131] In some further embodiments of this disclosure, after determining the state of the target based on its relative positional relationship with other targets, the vehicle terminal can also perform... Figure 4 A flowchart of a target state recognition method is provided, such as... Figure 4 As shown, the target state recognition method provided in this embodiment may include steps 410-440:
[0132] Step 410: Determine the relative positional relationship between the target and other targets as the first relative positional relationship.
[0133] In this embodiment of the present disclosure, after determining the state of the target based on the relative positional relationship between the target and other targets, the vehicle terminal can store the state of the target, the road image corresponding to the state, and the relative positional relationship corresponding to the state, and determine the relative positional relationship between the target and other targets as the first relative positional relationship.
[0134] Step 420: For each state, obtain a preset number of road images corresponding to that state.
[0135] In this embodiment of the disclosure, for each state, the vehicle terminal can obtain a preset number of road images corresponding to that state from the storage space. The preset number can be set according to actual needs and is not specifically limited here.
[0136] Step 430: For each road image, based on the pixel coordinates of the target tracking box and other tracking boxes in the road image, determine the second relative positional relationship between the target and other targets.
[0137] In this embodiment of the present disclosure, after the vehicle terminal acquires the road images corresponding to a preset number of frame states, it can determine the second relative positional relationship between the target and other targets based on the pixel coordinates of the target tracking box and other tracking boxes in the road image for each road image. For details, please refer to the relevant content in step 130 above, which will not be repeated here.
[0138] Step 440: Determine the number of second relative positional relationships in each road image that belong to the first relative positional relationship.
[0139] In this embodiment of the present disclosure, the vehicle terminal can determine the number of second relative position relationships in each road image that belong to the first relative position relationship based on the stored first relative position relationship.
[0140] Step 440: If the sixth ratio of the quantity to the preset quantity is greater than the fifth preset ratio threshold, then determine the correspondence between the relative positional relationship and the state.
[0141] In this embodiment of the disclosure, if the sixth ratio of the number of second relative positional relationships belonging to the first relative positional relationship in each road image to a preset number is greater than a fifth preset ratio threshold, the vehicle terminal can determine the correspondence between the relative positional relationship and the state. The fifth preset ratio threshold can be set as needed; for example, it can be 0.5, and is not specifically limited here.
[0142] Therefore, the results of determining the state of a target based on its relative positional relationship in multiple road images can be voted on to determine the correspondence between the relative positional relationship and the state, thereby improving the stability and accuracy of target state recognition.
[0143] Figure 5 This is a schematic diagram of the structure of a target state recognition device provided in an embodiment of this disclosure. This device can be understood as the aforementioned vehicle-mounted terminal or a portion of the functional modules within the aforementioned vehicle-mounted terminal. For example... Figure 5 As shown, the target state recognition device 500 may include:
[0144] The first acquisition module 510 is used to acquire road images in the direction of travel of the target vehicle;
[0145] The recognition module 520 is used to recognize road images based on the target detection model, and obtain the target tracking box of the target in the road image and other tracking boxes of other targets, including pedestrians and cyclists;
[0146] The first determining module 530 is used to determine the relative positional relationship between the target and other targets based on the pixel coordinates of the target tracking box and other tracking boxes in the road image;
[0147] The second determining module 540 is used to determine the state of the target based on the correspondence between relative positional relationships and states.
[0148] Optionally, the first determining module 530 mentioned above may include:
[0149] The first determination submodule is used to determine the size of the target tracking box and other tracking boxes in the road image based on the pixel coordinates of the target tracking box and other tracking boxes in the road image;
[0150] The second determination submodule is used to compare the size of the target tracking box with the size of other tracking boxes to determine the relative positional relationship between the target and other targets. The relative positional relationship between the target and other targets includes at least one of the following: the target is behind other cyclists, the target is behind other objects, the target is behind other vehicles, the target is within the lane, and the relative positional relationship between the target and the target vehicle. The relative positional relationship between the target and the target vehicle includes at least one of the following: the target is close to the front of the target vehicle, and the target is at a distance from the target vehicle.
[0151] Optionally, the second determining submodule mentioned above may include:
[0152] The first calculation unit is used to calculate the area of the target tracking box and the area of the other cyclist tracking boxes based on the size of the target tracking box and the size of the other cyclist tracking boxes.
[0153] The second calculation unit is used to calculate the first ratio between the area of other cyclists' tracking frames and the area of the target tracking frame;
[0154] The first determining unit is used to determine the position of the target behind other cyclists if the first ratio is greater than the first preset ratio threshold.
[0155] Optionally, the second determining submodule mentioned above may include:
[0156] The second determining unit is used to determine the width of the target tracking box and the width of the object tracking box based on the size of the target tracking box and the size of the object tracking boxes of other objects;
[0157] The third calculation unit is used to calculate a second ratio between the width of the object tracking box and the width of the target tracking box;
[0158] The third determining unit is used to determine the position of the target behind other objects if the second ratio is greater than the second preset ratio threshold.
[0159] Optionally, the second determining submodule mentioned above may include:
[0160] The fourth determining unit is used to determine the height and width of the target tracking frame and the height and width of the other vehicle tracking frames based on the size of the target tracking frame and the size of the other vehicle tracking frames;
[0161] The fourth calculation unit is used to calculate the third ratio of the height of other vehicle tracking frames to the height of the target tracking frame and the fourth ratio of the width of other vehicle tracking frames to the width of the target tracking frame.
[0162] The fifth determining unit is used to determine that the target's position is behind other vehicles if the third ratio is greater than 0 and the fourth ratio is greater than the third preset ratio threshold.
[0163] Optionally, the fifth determining unit mentioned above may include:
[0164] The first determining subunit is used to determine that all targets are after other vehicles if the third ratio is greater than or equal to 1 and the fourth ratio is greater than the third preset ratio threshold.
[0165] The second determining subunit is used to determine that if the third ratio is between 0.5 and 1 and the fourth ratio is greater than the third preset ratio threshold, then the target is mostly behind other vehicles.
[0166] The third determining subunit is used to determine that the target small part is after other vehicles if the third ratio is greater than 0 and less than 0.5, and the fourth ratio is greater than the third preset ratio threshold.
[0167] Optionally, the second determining submodule mentioned above may include:
[0168] The fifth calculation unit is used to calculate the width of the target tracking box outside the lane and the width of the lane based on the size of the target tracking box and the size of the lane;
[0169] The sixth determining unit is used to determine that the target's position is not within the lane if the fifth ratio between the width of the target tracking box outside the lane and the width of the lane is greater than the fourth preset ratio threshold.
[0170] Optionally, the second determining submodule described above may further include:
[0171] The projection transformation unit is used to project and transform the pixel coordinates of the target tracking box in the road image to the vehicle coordinate system of the target vehicle, so as to obtain the projected coordinates of the target tracking box in the vehicle coordinate system.
[0172] The seventh determining unit is used to determine the relative positional relationship between the target and the target vehicle based on the projected coordinates of the target tracking box in the vehicle coordinate system. The relative positional relationship between the target and the target vehicle includes at least one of the following: the target is close to the front of the target vehicle, or the target is at a distance from the target vehicle.
[0173] Optionally, the seventh determining unit mentioned above may include:
[0174] The first calculation subunit is used to calculate the longitudinal coordinates of the front of the target vehicle in the vehicle coordinate system based on the distance between the external tangent plane of the front of the target vehicle and the centroid of the target vehicle.
[0175] The second calculation subunit is used to calculate the distance between the target tracking box and the longitudinal coordinate of the vehicle front in the vehicle coordinate system based on the projected coordinates of the target tracking box.
[0176] The fourth determining subunit is used to determine that the target is close to the front of the target vehicle if the distance between the target tracking box and the longitudinal coordinate of the vehicle's front is less than a first preset distance threshold.
[0177] Optionally, the seventh determining unit mentioned above may include:
[0178] The third calculation subunit is used to calculate the longitudinal coordinates of the front of the target vehicle in the vehicle coordinate system based on the distance between the external tangent plane of the front of the target vehicle and the centroid of the target vehicle.
[0179] The fifth determining subunit is used to determine the projected coordinates of the midpoint of the upper boundary of the target tracking box based on the projected coordinates of the target tracking box;
[0180] The fourth calculation subunit is used to calculate the longitudinal distance between the projected coordinates of the midpoint of the upper boundary and the longitudinal coordinates of the front of the vehicle;
[0181] The sixth determining subunit is used to determine that the target is at a distance from the target vehicle if the longitudinal distance is greater than the second preset distance threshold.
[0182] Optionally, the second determining module 540 described above may include:
[0183] The third determination submodule is used to determine the target's state as being obscured by other cyclists if the target's position is behind other cyclists;
[0184] The fourth determination submodule is used to determine the target's state as being occluded by other objects if the target's position is behind other objects.
[0185] The fifth determination submodule is used to determine the target's state as being obscured by other vehicles if the target's position is behind other vehicles;
[0186] The sixth determination submodule is used to determine the target's status as "target is in lane" if the target's location is within the lane.
[0187] The seventh determination submodule is used to determine the target's state as "target is close to the front of the target vehicle" if the target is close to the front of the target vehicle.
[0188] The eighth determination submodule is used to determine the target's state as "the target is far away from the target vehicle" if the target is at a distance from the target vehicle.
[0189] Optionally, the fifth determining submodule mentioned above may include:
[0190] The eighth determining unit is used to determine the state of the target as being completely obscured by other vehicles if the target is completely behind other vehicles.
[0191] The ninth determining unit is used to determine the state of the target as being partially obscured by other vehicles if the target is mostly behind other vehicles.
[0192] The tenth determining unit is used to determine the state of the target as being partially obscured by other vehicles if a small portion of the target is behind other vehicles.
[0193] Optionally, the first determining module 530 mentioned above may include:
[0194] The ninth determination submodule is used to determine the left distance between the left boundary of the target tracking box and the left edge of the road image, and the right distance between the right boundary of the target tracking box and the right edge of the road image, based on the pixel coordinates of the target tracking box in the road image.
[0195] The tenth determination submodule is used to determine that the target tracking box is at the edge of the road image if the left distance or right distance is less than the third preset distance threshold.
[0196] The acquisition submodule is used to acquire historical frame images corresponding to road images;
[0197] The eleventh determination submodule is used to determine the target's walking direction based on road images and historical frame images;
[0198] The twelfth determination submodule is used to determine whether the target's walking direction intersects with the target vehicle's driving direction if the angle between the walking direction and the target vehicle's driving direction is between 0 and 180 degrees.
[0199] Optionally, the second determining module 540 described above may include:
[0200] The thirteenth determination submodule is used to determine the target's state as the target entering the screen if the target's walking direction intersects with the target vehicle's driving direction.
[0201] Optionally, the target state recognition device 500 may further include:
[0202] The calculation module is used to calculate the aspect ratio of the cyclist tracking box based on the pixel coordinates of the cyclist tracking box in the road image;
[0203] The third determining module is used to determine the rider's state as a traversing state if the aspect ratio is greater than a preset ratio.
[0204] Optionally, the target state recognition device 500 may further include:
[0205] The fourth determining module is used to determine the relative positional relationship between the target and other targets as the first relative positional relationship;
[0206] The second acquisition module is used to acquire a preset number of frames of road images corresponding to each state.
[0207] The fifth determination module is used to determine the second relative positional relationship between the target and other targets based on the pixel coordinates of the target tracking box and other tracking boxes in the road image for each road image;
[0208] The sixth determining module is used to determine the number of second relative positional relationships belonging to the first relative positional relationship in each road image;
[0209] The seventh determination module is used to determine the correspondence between the relative positional relationship and the state if the sixth ratio of the quantity to the preset quantity is greater than the fifth preset ratio threshold.
[0210] The apparatus provided in this disclosure can implement the methods of any of the above embodiments, and its execution and beneficial effects are similar, so they will not be described again here.
[0211] This disclosure also provides a vehicle-mounted terminal, which includes a processor and a memory. The memory stores a computer program. When the computer program is executed by the processor, it can implement the methods of any of the above embodiments. The execution method and beneficial effects are similar and will not be described again here.
[0212] Figure 6 This is a schematic diagram of the structure of a vehicle-mounted terminal provided in an embodiment of this disclosure, as shown below. Figure 6 As shown, the vehicle terminal 600 may include a processor 610 and a memory 620. The memory 620 stores a computer program 621. When the computer program 621 is executed by the processor 610, it can implement the method provided in any of the above embodiments. The execution method and beneficial effects are similar and will not be described again here.
[0213] Of course, for the sake of simplicity, Figure 6 Only some of the components of the vehicle terminal 600 relevant to the present invention are shown in this illustration; components such as buses, input / output interfaces, input devices, and output devices are omitted. In addition, the vehicle terminal 600 may include any other suitable components depending on the specific application.
[0214] This disclosure provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it can implement the methods of any of the above embodiments. The execution method and beneficial effects are similar, and will not be described again here.
[0215] The aforementioned computer-readable storage medium may be any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may, for example, include, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0216] The computer program described above can be written in any combination of one or more programming languages to perform the operations of the embodiments of this disclosure. The programming languages include object-oriented programming languages such as Java and C++, as well as conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on the user's in-vehicle terminal, partially on the user's device, as a standalone software package, partially on the user's in-vehicle terminal and partially on a remote in-vehicle terminal, or entirely on a remote in-vehicle terminal or server.
[0217] This disclosure provides a vehicle that includes the above-described vehicle-mounted terminal, which can implement the methods of any of the above embodiments. The execution method and beneficial effects are similar, and will not be described again here.
[0218] The above description is merely a specific embodiment of this disclosure, enabling those skilled in the art to understand or implement it. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this disclosure. Therefore, this disclosure is not to be limited to the embodiments described herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A target state recognition method characterized by comprising: The method comprises: acquiring a road image of a driving direction of a target vehicle; identifying the road image based on a target detection model to obtain a target tracking frame of a target in the road image and other tracking frames of other targets other than the target, the target including a pedestrian and a cyclist, and the other targets including at least one of other pedestrians, other cyclists, other objects, a lane, other vehicles, and the target vehicle; determining a relative position relationship between the target and the other targets based on pixel coordinates of the target tracking frame and the other tracking frames in the road image; determining a state of the target based on a corresponding relationship between the relative position relationship and the state; wherein when the determined relative position relationship between the target and the other targets is a relative position relationship between the target and the target vehicle, the determining of the relative position relationship between the target and the other targets based on the pixel coordinates of the target tracking frame and the other tracking frames in the road image comprises: projecting the pixel coordinates of the target tracking frame in the road image to a vehicle coordinate system of the target vehicle to obtain projected coordinates of the target tracking frame in the vehicle coordinate system; determining the relative position relationship between the target and the target vehicle based on the projected coordinates of the target tracking frame in the vehicle coordinate system, the relative position relationship between the target and the target vehicle including at least one of the target being close to a front of the target vehicle and the target being at a distance from the target vehicle.
2. The method of claim 1, wherein, The determining of the relative position relationship between the target and the other targets based on the pixel coordinates of the target tracking frame and the other tracking frames in the road image further comprises: determining sizes of the target tracking frame and the other tracking frames in the road image based on the pixel coordinates of the target tracking frame and the other tracking frames in the road image; comparing the size of the target tracking frame with the sizes of the other tracking frames to determine a relative position relationship of the target and the other targets, the relative position relationship of the target and the other targets including at least one of the target being behind other cyclists, the target being behind other objects, the target being behind other vehicles, and whether the target is in the lane.
3. The method of claim 2, wherein, The comparing of the size of the target tracking frame with the sizes of the other tracking frames to determine that the target is behind other cyclists comprises: calculating areas of the target tracking frame and other cyclist tracking frames based on the size of the target tracking frame and the sizes of the other cyclist tracking frames; calculating a first proportion of the area of the other cyclist tracking frame to the area of the target tracking frame; if the first proportion is greater than a first preset proportion threshold, determining that the target is behind other cyclists.
4. The method of claim 2, wherein, The comparing of the size of the target tracking frame with the sizes of the other tracking frames to determine that the target is behind other objects comprises: determine a width of the target tracking box and a width of the object tracking box based on the size of the target tracking box and the size of the object tracking box of the other object; calculate a second ratio of the width of the object tracking box to the width of the target tracking box; if the second ratio is greater than a second preset ratio threshold, determine that the target is behind the other object.
5. The method of claim 2, wherein, The comparing the size of the target tracking box with the size of the other tracking box to determine that the target is behind the other vehicle includes: determine a height and a width of the target tracking box and a height and a width of the other vehicle tracking box based on the size of the target tracking box and the size of the other vehicle tracking box; calculate a third ratio of the height of the other vehicle tracking box to the height of the target tracking box and a fourth ratio of the width of the other vehicle tracking box to the width of the target tracking box; if the third ratio is greater than 0 and the fourth ratio is greater than a third preset ratio threshold, determine that the target is behind the other vehicle.
6. The method of claim 5, wherein, The if the third ratio is greater than 0 and the fourth ratio is greater than a third preset ratio threshold, determine that the target is behind the other vehicle includes: if the third ratio is greater than 1 or equal to 1 and the fourth ratio is greater than a third preset ratio threshold, determine that the target is entirely behind the other vehicle; if the third ratio is between 0.5 and 1 and the fourth ratio is greater than a third preset ratio threshold, determine that the target is mostly behind the other vehicle; if the third ratio is greater than 0 and less than 0.5 and the fourth ratio is greater than a third preset ratio threshold, determine that the target is a small part behind the other vehicle.
7. The method of claim 2, wherein, The comparing the size of the target tracking box with the size of the other tracking box to determine that the target is not in the lane includes: calculate a width of the target tracking box outside the lane and a width of the lane based on the size of the target tracking box and the size of the lane; if a fifth ratio between the width of the target tracking box outside the lane and the width of the lane is greater than a fourth preset ratio threshold, determine that the target is not in the lane.
8. The method of claim 1, wherein, The determining that the target is close to the front of the target vehicle based on the projection coordinates of the target tracking box in the vehicle coordinate system includes: calculate a longitudinal coordinate of the front of the target vehicle in the vehicle coordinate system based on a distance between an excircle plane of the front of the target vehicle and a centroid of the target vehicle; calculate a distance between the target tracking box and the longitudinal coordinate of the front of the target vehicle in the vehicle coordinate system based on the projection coordinates of the target tracking box; if the distance between the target tracking box and the longitudinal coordinate of the front of the target vehicle is less than a first preset distance threshold, determine that the target is close to the front of the target vehicle.
9. The method of claim 1, wherein, The determining that the target is at a long distance from the target vehicle based on the projection coordinates of the target tracking box in the vehicle coordinate system includes: calculating a longitudinal coordinate of the head of the target vehicle in the vehicle coordinate system based on a distance between an outer tangent plane of the head of the target vehicle and a center of mass of the target vehicle; determining a projection coordinate of a top boundary midpoint of the target tracking frame based on the projection coordinate of the target tracking frame; calculating a longitudinal distance between the projection coordinate of the top boundary midpoint and the longitudinal coordinate of the head; if the longitudinal distance is greater than a second preset distance threshold, determining that the target is at a long distance from the target vehicle.
10. The method of claim 2, wherein, The determining of the state of the target based on the corresponding relationship between the relative position relationship and the state comprises: if the position of the target is behind other cyclists, determining that the state of the target is that the target is blocked by the other cyclists; if the position of the target is behind other objects, determining that the state of the target is that the target is blocked by the other objects; if the position of the target is behind other vehicles, determining that the state of the target is that the target is blocked by the other vehicles; if the position of the target is in a lane, determining that the state of the target is that the target is in the lane; if the target is close to the head of the target vehicle, determining that the state of the target is that the target is close to the head of the target vehicle; if the target is at a long distance from the target vehicle, determining that the state of the target is that the target is far away from the target vehicle.
11. The method of claim 10, wherein, The determining of the state of the target if the position of the target is behind other vehicles, comprises: if all the targets are behind the other vehicles, determining that the state of the target is that the target is completely blocked by the other vehicles; if most of the targets are behind the other vehicles, determining that the state of the target is that the target is partially blocked by the other vehicles; if a small part of the targets are behind the other vehicles, determining that the state of the target is that the target is slightly blocked by the other vehicles.
12. The method of claim 1, wherein, The determining of the relative position relationship between the target and the other targets based on the pixel coordinates of the target tracking frame and the other tracking frames in the road image further comprises: determining a left distance of a left boundary of the target tracking frame from a left edge of the road image and a right distance of a right boundary of the target tracking frame from a right edge of the road image based on the pixel coordinates of the target tracking frame in the road image; if the left distance or the right distance is less than a third preset distance threshold, determining that the target tracking frame is at the edge of the road image; obtaining a historical frame image corresponding to the road image; determining a walking direction of the target based on the road image and the historical frame image; if an included angle between the walking direction of the target and a driving direction of the target vehicle is between 0 and 180 degrees, determining that the walking direction of the target intersects with the driving direction of the target vehicle.
13. The method of claim 12, wherein, The determining of the state of the target based on the corresponding relationship between the relative position relationship and the state comprises: if the walking direction of the target intersects with the driving direction of the target vehicle, determining that the state of the target is that the target cuts into the picture.
14. The method of claim 1, wherein, After determining the state of the target based on the correspondence between the relative position relationship and the state, the method further includes: calculating an aspect ratio of the cyclist tracking box based on pixel coordinates of the cyclist tracking box corresponding to the cyclist in the road image; if the aspect ratio is greater than a preset ratio, determining that the state of the cyclist is a crossing state.
15. The method of claim 1, wherein, After determining the state of the target based on the correspondence between the relative position relationship and the state, the method further includes: determining the relative position relationship as a first relative position relationship; for the state of the target, acquiring a preset number of frames of road images corresponding to the state; for each of the road images, determining a second relative position relationship between the target and the other targets based on pixel coordinates of the target tracking box and the other tracking boxes in the road image; determining a number of the second relative position relationships in each of the road images that belong to the first relative position relationship; if a sixth proportion of the number and the preset number is greater than a fifth preset proportion threshold, determining the correspondence between the relative position relationship and the state.
16. A target state recognition apparatus characterized by comprising: The method includes: a first acquisition module configured to acquire a road image in a driving direction of a target vehicle; an identification module configured to identify the road image based on a target detection model to obtain a target tracking box of a target and other tracking boxes of other targets other than the target in the road image, the target including a pedestrian and a cyclist, and the other targets including at least one of other pedestrians, other cyclists, other objects, a lane, other vehicles, and the target vehicle; a first determination module configured to determine a relative position relationship between the target and the other targets based on pixel coordinates of the target tracking box and the other tracking boxes in the road image; a second determination module configured to determine a state of the target based on a correspondence between the relative position relationship and the state; when the determined relative position relationship between the target and the other targets is a relative position relationship between the target and the target vehicle, the determination of the relative position relationship between the target and the other targets based on the pixel coordinates of the target tracking box and the other tracking boxes in the road image includes: projecting the pixel coordinates of the target tracking box in the road image to a vehicle coordinate system of the target vehicle to obtain projected coordinates of the target tracking box in the vehicle coordinate system; determining the relative position relationship between the target and the target vehicle based on the projected coordinates of the target tracking box in the vehicle coordinate system, the relative position relationship between the target and the target vehicle including at least one of the target being close to a front of the target vehicle and the target being at a distance from the target vehicle.
17. A vehicle terminal, characterized by The method includes: a memory and a processor, wherein the memory stores a computer program that, when executed by the processor, implements the target state identification method of any one of claims 1-15.
18. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, and when the computer program is executed by a processor, the target state identification method in any one of claims 1-15 is implemented.
19. A vehicle characterized by comprising: The vehicle comprises the vehicle-mounted terminal in claim 17.
Citation Information
Patent Citations
Anti-collision early-warning method based on pedestrians and riders in front of road
CN109334563A
Method and device for determining object state, equipment and storage medium
CN110119698A