Vehicle obstacle early warning method, device and equipment and storage medium
By using binocular cameras and models based on YOLO and binocular stereo matching algorithms on vehicles, we can identify and measure the distance barriers, and solve the problems of low ranging accuracy and high error detection rate of monocular cameras, achieving high accuracy and rapid obstacle detection and early warning.
Patent Information
- Application Number
- CN202510068512.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-16
- Publication Date
- 2025-04-15
AI Technical Summary
In the prior art, the visual ranging accuracy of a monocular camera is low and the robustness is poor. The traditional object detection method has low detection accuracy, slow detection speed, and high error detection rate, making it difficult to effectively identify and early warning of obstacles around the vehicle.
Images are collected using a binocular camera, and the image is processed using a target recognition model based on the YOLO algorithm to determine the target obstacle area. Then, the recognized image is input to the target distance measurement model based on the binocular stereo matching algorithm, calculate the distance between the target obstacle and the vehicle, and determine whether it is less than or equal to the preset warning distance. If so, perform the preset warning operation.
It improves the accuracy and speed of obstacle detection, reduces the false detection rate, and realizes accurate identification and early warning of obstacles around the vehicle.
Smart Images

Figure CN119832523A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing, and in particular to a vehicle obstacle warning method, device, equipment and storage medium. Background Art
[0002] At present, monocular cameras are often used to collect images of the surrounding environment when vehicles are driving to identify whether there are various obstacles, such as humans, on the vehicle's route. However, the visual ranging accuracy of monocular cameras is low and the robustness is poor. Traditional target detection methods have low detection accuracy, slow detection speed, and high false detection rate. Therefore, how to improve the accuracy and speed of obstacle detection and reduce the false detection rate is a problem that needs to be solved urgently. Summary of the invention
[0003] In view of this, the purpose of the present invention is to provide a vehicle obstacle warning method, device, equipment and storage medium, which can improve the accuracy and speed of obstacle detection and reduce the false detection rate. The specific scheme is as follows:
[0004] In a first aspect, the present application discloses a vehicle obstacle warning method, comprising:
[0005] The image to be identified is collected by a binocular camera on the target vehicle, and the image to be identified is processed by a pre-trained target recognition model to determine the target obstacle area in the image to be identified and obtain a corresponding identified image; the image to be identified includes a left image to be identified and a right image to be identified; the identified image includes a identified left image and a identified right image; the target recognition model is a model built based on the YOLO algorithm;
[0006] The identified image is input into a pre-trained target distance measurement model for analysis to determine the target distance corresponding to the target obstacle area, and to determine whether the target distance is less than or equal to the preset warning distance; the target distance measurement model is a model constructed based on a binocular stereo matching algorithm;
[0007] If the target distance is less than or equal to the preset warning distance, the corresponding preset warning operation is performed.
[0008] Optionally, before using the pre-trained target recognition model to process the image to be recognized to determine the target obstacle area in the image to be recognized and obtain the corresponding recognized image, the method further includes:
[0009] Acquire a training image, and process the training image to obtain a processed image;
[0010] Annotating the obstacle area in the processed image based on a preset area division method to obtain an annotated image;
[0011] The labeled images are used to train the YOLO algorithm to obtain the target recognition model.
[0012] Optionally, processing the training image to obtain a processed image includes:
[0013] Converting the training image into a grayscale image, and performing Gaussian filtering on the grayscale image to obtain a filtered image;
[0014] The filtered image is processed based on a preset image dedistortion algorithm to obtain the processed image.
[0015] Optionally, the preset area division method is any one or more combinations of manual labeling method, marking box labeling method, sliding window method and machine learning model labeling method.
[0016] Optionally, the vehicle obstacle warning method further includes:
[0017] If the target distance is greater than the preset warning distance, the process jumps to the step of collecting the image to be identified by the binocular camera on the target vehicle.
[0018] Optionally, the vehicle obstacle warning method further includes:
[0019] Gray-scaling the image to be identified to obtain a target gray-scale image, and Gaussian filtering the target gray-scale image to obtain a target filtered image;
[0020] The target filtered image is processed by using a preset image dedistortion algorithm to obtain an image to be detected, and the image to be detected is detected based on a preset road detection algorithm to determine the target road.
[0021] Optionally, the detecting the image to be detected based on a preset road detection algorithm to determine the target road includes:
[0022] The image to be detected is detected by using a target edge detection algorithm to extract the target edge in the image to be detected, and the target edge is filtered based on a preset Hough line slope to determine the target road.
[0023] In a second aspect, the present application discloses a vehicle obstacle warning device, comprising:
[0024] An image recognition module is used to collect an image to be recognized through a binocular camera on a target vehicle, and process the image to be recognized using a pre-trained target recognition model to determine a target obstacle area in the image to be recognized and obtain a corresponding recognized image; the image to be recognized includes a left image to be recognized and a right image to be recognized; the recognized image includes a recognized left image and a recognized right image; the target recognition model is a model built based on the YOLO algorithm;
[0025] A distance judgment module is used to input the recognized image into a pre-trained target distance measurement model for analysis to determine the target distance corresponding to the target obstacle area, and to judge whether the target distance is less than or equal to the preset warning distance; the target distance measurement model is a model constructed based on a binocular stereo matching algorithm;
[0026] The first operation execution module is used to execute a corresponding preset warning operation if the target distance is less than or equal to the preset warning distance.
[0027] In a third aspect, the present application discloses an electronic device, comprising:
[0028] Memory, used to store computer programs;
[0029] The processor is used to execute the computer program to implement the aforementioned vehicle obstacle warning method.
[0030] In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program, wherein the computer program implements the aforementioned vehicle obstacle warning method when executed by a processor.
[0031] In the present application, when performing obstacle detection, the image to be identified is collected by a binocular camera on the target vehicle, and the image to be identified is processed by a pre-trained target recognition model to determine the target obstacle area in the image to be identified and obtain the corresponding identified image; the image to be identified includes a left image to be identified and a right image to be identified; the identified image includes a left image after identification and a right image after identification; the target recognition model is a model built based on the YOLO algorithm; the identified image is input into a pre-trained target ranging model for analysis to determine the target distance corresponding to the target obstacle area, and to determine whether the target distance is less than or equal to the preset warning distance; the target ranging model is a model built based on a binocular stereo matching algorithm; if the target distance is less than or equal to the preset warning distance, the corresponding preset warning operation is performed. It can be seen that the present application introduces a target recognition model constructed by using the YOLO algorithm to perform target recognition on the image to be recognized collected by the binocular camera, so as to accurately identify whether there are target obstacles around the vehicle, and then input the recognized image output by the target recognition model into the target ranging model for processing, so as to quickly determine the target distance between the target obstacle and the vehicle. At the same time, since the target ranging model is a model constructed based on the binocular stereo matching algorithm, the obtained target distance is highly accurate, and whether the preset warning operation needs to be performed is judged according to the size relationship between the preset warning distance and the target distance, thereby reducing the false detection rate. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0033] Figure 1 A flow chart of a vehicle obstacle warning method disclosed in this application;
[0034] Figure 2 A schematic diagram of a specific image preprocessing process disclosed in this application;
[0035] Figure 3 This is a schematic structural diagram of a vehicle obstacle warning device disclosed in this application;
[0036] Figure 4 This is a structural diagram of an electronic device disclosed in this application. DETAILED DESCRIPTION
[0037] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0038] At present, monocular cameras are often used to collect images of the surrounding environment when a vehicle is driving to identify whether there are various obstacles, such as humans, on the vehicle's route. However, the visual ranging accuracy of monocular cameras is low and the robustness is poor. Traditional target detection methods have low detection accuracy, slow detection speed, and high false detection rate. In order to solve the above technical problems, the present application discloses a vehicle obstacle warning method, which can improve the accuracy and speed of obstacle detection and reduce the false detection rate.
[0039] See also Figure 1 As shown, an embodiment of the present invention discloses a vehicle obstacle warning method, comprising:
[0040] Step S11, collecting an image to be identified through a binocular camera on a target vehicle, and processing the image to be identified using a pre-trained target recognition model to determine the target obstacle area in the image to be identified and obtain a corresponding identified image; the image to be identified includes a left image to be identified and a right image to be identified; the identified image includes a identified left image and a identified right image; the target recognition model is a model built based on the YOLO algorithm.
[0041] In this embodiment, the image to be identified for obstacle warning is collected by a binocular camera on the target vehicle, and the binocular camera can be calibrated based on the binocular stereo matching algorithm, which can specifically include: within the range of 1000mm to 5000mm, 4 samples are collected every 100mm, and a total of 284 samples are collected, and the average value of the 4 sample points selected every 100mm is taken, which is regarded as the predicted distance of the position. According to the error calculation formula, the prediction error of the binocular ranging of the binocular visual perception system is calculated. The image to be identified includes a left image to be identified and a right image to be identified, and the corresponding identified image includes a left image after identification and a right image after identification. The identified image is obtained by using a target recognition model to identify the target obstacle area in the image to be identified, wherein the target recognition model is a model built based on the YOLO (You Only Look Once, a target detection algorithm) algorithm.
[0042] In this embodiment, before using a pre-trained target recognition model to process the image to be recognized to determine the target obstacle area in the image to be recognized and obtain the corresponding recognized image, it is also necessary to obtain a trained target recognition model. The specific process may include: obtaining a training image, and processing the training image to obtain a processed image; marking the obstacle area in the processed image based on a preset area division method to obtain a marked image; using the marked image to train the YOLO algorithm to obtain a target recognition model. Among them, when marking the obstacle area, the preset area division method used can be any one or more combinations of manual marking method, marking box marking method, sliding window method and machine learning model marking method. If the manual marking method is used, the area containing key information can be selected as the target obstacle area based on manual experience and professional knowledge, so as to adjust it for different situations.
[0043] In this embodiment, the YOLOv5 (You Only Look Once version 5, a target detection algorithm) algorithm can be selected to build a target recognition model, and the labeled images are used to build a training set to train the target recognition model, thereby continuously optimizing the performance of the target recognition model, enhancing the generalization ability and robustness of the model, and ultimately achieving high-precision recognition of obstacles such as human targets that may appear near the target vehicle, providing important guarantees for vehicle safety and passenger riding experience. Figure 2 As shown, the process of processing the training image to obtain the processed image may specifically include: converting the training image into a grayscale image, and performing Gaussian filtering on the grayscale image to obtain a filtered image; processing the filtered image based on a preset image dedistortion algorithm to obtain a processed image. The principle of Gaussian filtering is a convolution operation based on a Gaussian function, which randomly reduces the noise in the image through different degrees of blur processing to make the image smoother. When performing image dedistortion, the method of calibrating parameters can be used to eliminate image distortion. By shooting calibration plates at different angles, it can be used to calibrate the parameters of the binocular camera, and the obtained parameters can be used to remove image distortion and binocular ranging. The correction method can use perspective transformation and other technologies to remove distortion in the image. The RGB image obtained by the binocular camera includes two types of information: color and brightness, and the grayscale operation is to eliminate the color in the RGB image and only retain the brightness information, so that the clarity, contrast and brightness of the obtained grayscale image are improved, which is more suitable for image processing and image feature extraction. When performing grayscale operation, the grayscale value calculation formula is used to determine the grayscale value of each pixel in the grayscale image. The grayscale value calculation formula is:
[0044] Gray=0.3×R+0.59×G+0.11×B(2-1);
[0045] Among them, Gray is the gray value of the target pixel, R, G, and B are the red channel value, green channel value, and blue channel value of the target pixel in the original RGB image, respectively.
[0046] In this embodiment, the image to be identified obtained by using the binocular camera can be used for road identification in addition to obstacle detection. The specific process may include: graying the image to be identified to obtain a target gray image, and Gaussian filtering the target gray image to obtain a target filtered image; processing the target filtered image using a preset image dedistortion algorithm to obtain an image to be detected, and detecting the image to be detected based on a preset road detection algorithm to determine the target road. When determining the target road in the image to be detected, the specific process includes: detecting the image to be detected using a target edge detection algorithm to extract the target edge in the image to be detected, and filtering the target edge based on a preset Hough line slope to determine the target road. Since the straight line in the image is represented as a curve in the Hough space, and the result of the Hough transform is the point with the most intersections of the curve, corresponding to the possible straight line in the image. For each pixel point in the image, it is only necessary to increase the count of the intersections of the straight line passing through the pixel point in the Hough space by one, and finally obtain the position of the road according to the number of intersections and the highest point in the Hough space.
[0047] In a specific implementation, a polar coordinate parameter space (also known as a Hough space) may be created first. The parameter space is a two-dimensional matrix of polar radius ρ and polar angle θ, where θ ranges from 0° to 180°. Then, a target edge detection algorithm (such as a Canny edge detection algorithm) is used to extract the target edge in the image to be detected, and pixels with a value of 255 may be set as edge pixels. Then, the Hough transform straight line detection algorithm is run based on the preset Hough line slope to determine the edge pixels in the image, and the θ value is used to calculate ρ for each edge pixel. For pixels on the same straight line, the values of θ and ρ will be the same. The pixel may be voted for with a weight of 1 in the Hough space, and ρ and θ whose voting results exceed the target voting threshold may be determined as a straight line, i.e., the target road.
[0048] Step S12: input the recognized image into a pre-trained target distance measurement model for analysis to determine the target distance corresponding to the target obstacle area, and judge whether the target distance is less than or equal to the preset warning distance; the target distance measurement model is a model constructed based on a binocular stereo matching algorithm.
[0049] In this embodiment, after obtaining the recognized image, the recognized image can be input into the target distance measurement model for analysis, so that the target distance measurement model can determine the target distance corresponding to the target obstacle area based on the recognized left image and the recognized right image, that is, the distance between the area where the target obstacle is located and the target vehicle, thereby judging the size relationship between the target distance and the preset warning distance. The image to be recognized collected by the binocular camera contains richer depth information than the image collected by the monocular camera. The target distance measurement model constructed by the SGBM (Semi-Global Block Matching, binocular stereo matching) algorithm can analyze the recognized left image and the recognized right image and calculate the disparity map, thereby applying the principle of similar triangles to determine the target distance between the target obstacle and the target vehicle. It can be understood that the target distance measurement model obtained after analyzing a large number of samples has better measurement accuracy and faster detection speed than the traditional distance measurement model constructed based on the image collected by the monocular camera.
[0050] Step S13: If the target distance is less than or equal to the preset warning distance, execute the corresponding preset warning operation.
[0051] In this embodiment, if the target distance is less than or equal to the preset warning distance, the corresponding preset warning operation will be performed. Correspondingly, if the target distance is greater than the preset warning distance, it will jump to the step of collecting the image to be identified through the binocular camera on the target vehicle. In a specific embodiment, the current vehicle speed is 30km / h, the target recognition range of the binocular camera is 200m, and the safety distance (that is, the preset warning distance) is 100m. When an obstacle is detected to appear in the target recognition range, a reminder message (such as a buzzer 1s / time alarm) is issued to remind the driver to operate. When an obstacle is detected to enter the safety distance, the buzzer alarms (such as a buzzer 0.5s / time alarm, and a flashing signal light). It can be understood that the corresponding safety distance will be different if the vehicle's driving speed is different. The higher the vehicle's driving speed, the greater the value of the safety distance when the target recognition range remains unchanged. In addition, if it is an unmanned vehicle, it can choose to slow down, honk the horn, etc. to remind pedestrians when pedestrians appear in the target recognition range. When pedestrians enter a safe distance, emergency braking will be performed and an attempt will be made to contact the administrator. Similar measures can be taken if obstacles are found on the established running track.
[0052] It can be seen that the present application introduces a target recognition model constructed by using the YOLO algorithm to perform target recognition on the image to be recognized collected by the binocular camera, so as to accurately identify whether there are target obstacles around the vehicle, and then input the recognized image output by the target recognition model into the target ranging model for processing, so as to quickly determine the target distance between the target obstacle and the vehicle. At the same time, since the target ranging model is a model constructed based on the binocular stereo matching algorithm, the obtained target distance is highly accurate, and whether the preset warning operation needs to be performed is judged according to the size relationship between the preset warning distance and the target distance, thereby reducing the false detection rate.
[0053] See also Figure 3 As shown, the present application discloses a vehicle obstacle warning device, comprising:
[0054] The image recognition module 11 is used to collect the image to be recognized through the binocular camera on the target vehicle, and use the pre-trained target recognition model to process the image to be recognized to determine the target obstacle area in the image to be recognized and obtain the corresponding recognized image; the image to be recognized includes a left image to be recognized and a right image to be recognized; the recognized image includes a recognized left image and a recognized right image; the target recognition model is a model built based on the YOLO algorithm;
[0055] The distance judgment module 12 is used to input the recognized image into a pre-trained target distance measurement model for analysis to determine the target distance corresponding to the target obstacle area, and to judge whether the target distance is less than or equal to the preset warning distance; the target distance measurement model is a model constructed based on a binocular stereo matching algorithm;
[0056] The first operation execution module 13 is configured to execute a corresponding preset warning operation if the target distance is less than or equal to the preset warning distance.
[0057] It can be seen that the present application introduces a target recognition model constructed by using the YOLO algorithm to perform target recognition on the image to be recognized collected by the binocular camera, so as to accurately identify whether there are target obstacles around the vehicle, and then input the recognized image output by the target recognition model into the target ranging model for processing, so as to quickly determine the target distance between the target obstacle and the vehicle. At the same time, since the target ranging model is a model constructed based on the binocular stereo matching algorithm, the obtained target distance is highly accurate, and whether the preset warning operation needs to be performed is judged according to the size relationship between the preset warning distance and the target distance, thereby reducing the false detection rate.
[0058] In a specific embodiment, the device may further include:
[0059] A first image processing module, used for acquiring a training image and processing the training image to obtain a processed image;
[0060] An image annotation module, used for annotating the obstacle area in the processed image based on a preset area division method to obtain an annotated image;
[0061] The recognition model training module is used to train the YOLO algorithm using the annotated image to obtain the target recognition model.
[0062] In a specific implementation, the image recognition module 11 may specifically include:
[0063] An image filtering unit, used for converting the training image into a grayscale image, and performing Gaussian filtering on the grayscale image to obtain a filtered image;
[0064] The image dedistortion unit is used to process the filtered image based on a preset image dedistortion algorithm to obtain the processed image.
[0065] In a specific embodiment, the device may further include:
[0066] The second operation execution module is used to jump to the step of collecting the image to be identified by the binocular camera on the target vehicle if the target distance is greater than the preset warning distance.
[0067] In a specific embodiment, the device may further include:
[0068] A second image processing module is used to grayscale the image to be identified to obtain a target grayscale image, and perform Gaussian filtering on the target grayscale image to obtain a target filtered image;
[0069] The target road determination module is used to process the target filtered image using a preset image dedistortion algorithm to obtain an image to be detected, and detect the image to be detected based on a preset road detection algorithm to determine the target road.
[0070] In a specific implementation, the target road determination module may specifically include:
[0071] The target road determination unit is used to detect the image to be detected by using a target edge detection algorithm to extract the target edge in the image to be detected, and filter the target edge based on a preset Hough line slope to determine the target road.
[0072] Furthermore, the present application also discloses an electronic device. Figure 4This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content in the diagram cannot be regarded as any limitation on the scope of use of the present application.
[0073] Figure 4 The present invention provides a schematic diagram of the structure of an electronic device 20 provided in an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the vehicle obstacle warning method disclosed in any of the aforementioned embodiments. In addition, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0074] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.
[0075] In addition, the memory 22 as a carrier for resource storage may be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon may include an operating system 221, a computer program 222, etc., and the storage method may be temporary storage or permanent storage.
[0076] The operating system 221 is used to manage and control the hardware devices and computer programs 222 on the electronic device 20, and may be Windows Server, Netware, Unix, Linux, etc. In addition to the computer program that can be used to complete the vehicle obstacle warning method performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 may further include computer programs that can be used to complete other specific tasks.
[0077] Furthermore, the present application also discloses a computer-readable storage medium for storing a computer program; wherein the computer program, when executed by a processor, implements the vehicle obstacle warning method disclosed above. The specific steps of the method can refer to the corresponding contents disclosed in the above embodiments, and will not be repeated here.
[0078] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0079] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0080] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0081] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0082] The technical solution provided by the present application is introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for general technicians in this field, according to the idea of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A vehicle obstacle warning method, characterized in that: include: The image to be identified is collected by a binocular camera on the target vehicle, and the image to be identified is processed by a pre-trained target recognition model to determine the target obstacle area in the image to be identified and obtain a corresponding identified image; the image to be identified includes a left image to be identified and a right image to be identified; the identified image includes a identified left image and a identified right image; the target recognition model is a model built based on the YOLO algorithm; Input the recognized image into a pre-trained target distance measurement model for analysis to determine the target distance corresponding to the target obstacle area, and determine whether the target distance is less than or equal to the preset warning distance; The target distance measurement model is a model constructed based on a binocular stereo matching algorithm; If the target distance is less than or equal to the preset warning distance, the corresponding preset warning operation is performed.
2. The vehicle obstacle warning method according to claim 1, characterized in that: Before the pre-trained target recognition model is used to process the image to be recognized to determine the target obstacle area in the image to be recognized and obtain the corresponding recognized image, the method further includes: Acquire a training image, and process the training image to obtain a processed image; Annotating the obstacle area in the processed image based on a preset area division method to obtain an annotated image; The labeled images are used to train the YOLO algorithm to obtain the target recognition model.
3. The vehicle obstacle warning method according to claim 2, characterized in that: The step of processing the training image to obtain a processed image comprises: Converting the training image into a grayscale image, and performing Gaussian filtering on the grayscale image to obtain a filtered image; The filtered image is processed based on a preset image dedistortion algorithm to obtain the processed image.
4. The vehicle obstacle warning method according to claim 2, characterized in that: The preset area division method is any one or more combinations of manual labeling method, marking box labeling method, sliding window method and machine learning model labeling method.
5. The vehicle obstacle warning method according to claim 1, characterized in that: Also includes: If the target distance is greater than the preset warning distance, the process jumps to the step of collecting the image to be identified by the binocular camera on the target vehicle.
6. The vehicle obstacle warning method according to any one of claims 1 to 5, characterized in that: Also includes: Gray-scaling the image to be identified to obtain a target gray-scale image, and Gaussian filtering the target gray-scale image to obtain a target filtered image; The target filtered image is processed by using a preset image dedistortion algorithm to obtain an image to be detected, and the image to be detected is detected based on a preset road detection algorithm to determine the target road.
7. The vehicle obstacle warning method according to claim 6, characterized in that: The detecting the image to be detected based on a preset road detection algorithm to determine the target road includes: The image to be detected is detected by using a target edge detection algorithm to extract the target edge in the image to be detected, and the target edge is filtered based on a preset Hough line slope to determine the target road.
8. A vehicle obstacle warning device, characterized in that: include: An image recognition module is used to collect an image to be recognized through a binocular camera on a target vehicle, and process the image to be recognized using a pre-trained target recognition model to determine a target obstacle area in the image to be recognized and obtain a corresponding recognized image; the image to be recognized includes a left image to be recognized and a right image to be recognized; the recognized image includes a recognized left image and a recognized right image; the target recognition model is a model built based on the YOLO algorithm; A distance judgment module is used to input the recognized image into a pre-trained target distance measurement model for analysis to determine the target distance corresponding to the target obstacle area, and to judge whether the target distance is less than or equal to the preset warning distance; The target distance measurement model is a model constructed based on a binocular stereo matching algorithm; The first operation execution module is used to execute a corresponding preset warning operation if the target distance is less than or equal to the preset warning distance.
9. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the vehicle obstacle warning method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: Used to store a computer program, wherein when the computer program is executed by a processor, the vehicle obstacle warning method according to any one of claims 1 to 7 is implemented.