A driving assistance method, device, and electronic device

By acquiring color and position features in the driving environment, calculating feature differences and dividing pixel blocks, and outputting driving assistance information, the problem of low driving safety is solved, the driver's attention to important environmental elements is improved, and the risk of accidents is reduced.

CN116109711BActive Publication Date: 2026-04-24CHINA MOBILE SHANGHAI ICT CO LTD +2
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA MOBILE SHANGHAI ICT CO LTD
Filing Date
2021-11-10
Publication Date
2026-04-24

AI Technical Summary

Technical Problem

Existing driving methods are less safe in complex driving environments, and drivers may cause traffic accidents because they fail to notice important environmental information.

Method used

By acquiring the color and position features of the vehicle's external driving environment image, calculating the feature difference between adjacent pixels, dividing pixels with feature differences less than a threshold into the same pixel block, and outputting the driving assistance information corresponding to the target pixel block, the driver's attention to preset environmental elements is improved.

Benefits of technology

It improves driving safety by accurately dividing pixel blocks and outputting important environmental information, helping drivers to pay attention to potential dangers in a timely manner and reducing the occurrence of accidents.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116109711B_ABST
    Figure CN116109711B_ABST
Patent Text Reader

Abstract

The application provides a driving assistance method, device and electronic equipment, the driving assistance method comprises: acquiring color features and position features of each pixel point in a first image, wherein the first image is an external driving environment image of a vehicle; based on the color features and the position features, calculating feature difference values between any two adjacent pixel points in the first image; determining any two adjacent pixel points with a feature difference value less than a first threshold in the first image as pixel points in the same pixel block to obtain at least one first pixel block; in the case that the at least one first pixel block includes a target pixel block, outputting driving assistance information corresponding to the target pixel block, wherein the target pixel block is a pixel block corresponding to a preset environmental element. The driving assistance method, device and electronic equipment provided by the application can solve the problem of low safety of the existing driving method.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing, and more specifically to a driving assistance method, device, and electronic device. Background Technology

[0002] In existing technologies, drivers typically control a vehicle by perceiving the external driving environment with their eyes. However, in certain situations, drivers may fail to notice important environmental information, leading to traffic accidents. For example, when drivers are fatigued or in complex external driving environments, they are prone to overlooking certain environmental information. Therefore, existing driving methods have inherent safety limitations. Summary of the Invention

[0003] This application provides a driving assistance method, device, and electronic device that can solve the problem of low safety in existing driving methods.

[0004] In a first aspect, embodiments of this application provide a driving assistance method, including:

[0005] Obtain the color and position features of each pixel in the first image, wherein the first image is an image of the vehicle's external driving environment;

[0006] Based on the color features and the position features, calculate the feature difference between any two adjacent pixels in the first image;

[0007] In the first image, any two adjacent pixels whose feature difference is less than the first threshold are identified as pixels in the same pixel block, thus obtaining at least one first pixel block.

[0008] If the at least one first pixel block includes a target pixel block, the driving assistance information corresponding to the target pixel block is output, wherein the target pixel block is a pixel block corresponding to a preset environmental element.

[0009] Secondly, embodiments of this application provide a driving assistance device, including:

[0010] The first acquisition module is used to acquire the color features and position features of each pixel in the first image, wherein the first image is an image of the vehicle's external driving environment.

[0011] The calculation module is used to calculate the feature difference between any two adjacent pixels in the first image based on the color features and the position features.

[0012] The first determining module is used to determine any two adjacent pixels in the first image whose feature difference is less than a first threshold as pixels in the same pixel block, thereby obtaining at least one first pixel block.

[0013] The output module is configured to output driving assistance information corresponding to the target pixel block when the at least one first pixel block includes the target pixel block, wherein the target pixel block is a pixel block corresponding to a preset environmental element.

[0014] Thirdly, embodiments of this application provide an electronic device, including: a processor, a memory, and a program stored in the memory and executable on the processor, wherein the program, when executed by the processor, implements the steps of the method described in the first aspect above.

[0015] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the method described in the first aspect above.

[0016] In this embodiment, the feature difference between two adjacent pixels is calculated based on their color and position features. Adjacent pixels with a feature difference less than a first threshold are identified as pixels in the same pixel block. This means that adjacent pixels with similar color and position features are determined to be in the same pixel block, thus improving the accuracy of pixel block segmentation. Then, it is determined whether at least one first pixel block includes a target pixel block. If the target pixel block is included, driving assistance information corresponding to the target pixel block is output to increase the driver's attention to preset environmental elements, thereby improving driving safety. Attached Figure Description

[0017] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments of this application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 This is one of the flowcharts of a driving assistance method provided in the embodiments of this application;

[0019] Figure 2 This is a second flowchart of a driving assistance method provided in the embodiments of this application;

[0020] Figure 3This is a schematic diagram of the structure of a driving assistance device provided in an embodiment of this application;

[0021] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0022] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0023] Please see Figure 1 The flowchart below illustrates a driving assistance method provided in an embodiment of this application. The method includes:

[0024] Step 101: Obtain the color features and position features of each pixel in the first image, wherein the first image is an image of the vehicle's external driving environment.

[0025] Step 102: Based on the color features and the position features, calculate the feature difference between any two adjacent pixels in the first image.

[0026] Step 103: In the first image, any two adjacent pixels whose feature difference is less than the first threshold are identified as pixels in the same pixel block, thus obtaining at least one first pixel block.

[0027] Step 104: If the target pixel block is included in the at least one first pixel block, output the driving assistance information corresponding to the target pixel block, wherein the target pixel block is a pixel block corresponding to a preset environmental element.

[0028] The first image can be an image captured by an in-vehicle high-definition camera of the driving environment in front of the vehicle. Thus, based on the image data output by the in-vehicle high-definition camera, the color features of each pixel in the first image can be obtained. The color features can refer to the brightness values ​​of the red, green, and blue (RGB) channels. Alternatively, the first image can also be an image obtained by pixel-level processing of an image captured by an in-vehicle high-definition camera.

[0029] While the vehicle-mounted high-definition camera captures the driving environment in front of the vehicle, multiple vehicle-mounted position detection sensors can simultaneously detect the positions of environmental elements in the driving environment to determine the actual relative position of each environmental element in the first image with respect to the vehicle. This allows for the determination of the positional features of each pixel in the first image. The vehicle-mounted position detection sensors may include vehicle-mounted LiDAR or millimeter-wave radar. Specifically, a three-dimensional spatial coordinate system can be pre-established with the vehicle as a reference. Then, based on the relative position of each pixel with respect to the vehicle, the three-dimensional coordinates of each pixel in the three-dimensional spatial coordinate system can be determined, and these three-dimensional coordinates can be used as the positional features.

[0030] After obtaining the color and position features of each pixel in the first image, the first image can be divided into pixel blocks based on these features. Specifically, the same environmental element in the first image can be divided into the same pixel block to determine which environmental elements are included in the first image. Furthermore, environmental elements that the driver may be highly interested in can be extracted and displayed to the driver to increase their attention to important environmental elements. These environmental elements specifically refer to external environmental factors that may affect the driver's driving operations. For example, these environmental elements may include: pedestrians, roadblocks, bicycles, electric vehicles, cars, trucks, the sky, the road surface, roadside walls, roadside trees, roadside buildings, roadside green belts, median strips, and traffic lights, etc.

[0031] When dividing the image into pixel blocks, since the colors of any two adjacent pixels within the same ambient element are usually very similar, and their spatial positions should also be quite close, we can determine whether any two adjacent pixels belong to the same pixel block by calculating the similarity of their color and positional features. This allows us to divide the first image into pixel blocks.

[0032] Specifically, the aforementioned feature difference can be used to characterize the color feature difference and positional feature difference between two adjacent pixels. The color feature difference refers to the magnitude of the color difference between two adjacent pixels, and the positional feature difference refers to the relative magnitude of the spatial distance between two adjacent pixels. A specific value for the first threshold can be preset according to the actual application scenario. When the feature difference is less than the first threshold, it can be considered that the color and positional features of the two adjacent pixels are relatively similar, and in this case, the two adjacent pixels can be identified as pixels in the same pixel block. Correspondingly, when the feature difference is greater than or equal to the first threshold, it can be considered that at least one of the color and positional features of the two adjacent pixels differs significantly, and in this case, the two pixels can be considered as pixels in different pixel blocks.

[0033] After calculating the feature difference between any two adjacent pixels in the first image, it can be determined whether any two adjacent pixels belong to the same pixel block. By clustering all pixels in the same pixel block, the first image can be divided into pixel blocks. Each pixel block in the first image can be defined as a first pixel block. The contour of each first pixel block can be determined based on the positional features of the edge pixels of each first pixel block. At the same time, the color information of each first pixel block can be determined based on the color features of each pixel in each first pixel block. Thus, the environmental element corresponding to the first pixel block can be determined through the contour and color information of the first pixel block. It can then be determined whether the first image includes a target pixel block. If the first image includes a target pixel block, the driving assistance information corresponding to the target pixel block is output. The target pixel block is a pixel block corresponding to a preset environmental element. The preset environmental element can be a pre-defined environmental element that the driver may pay close attention to.

[0034] It is understood that, compared to pixel block division based solely on color features in an image, the pixel block division method provided in this application improves accuracy by incorporating both color and positional features. The reason for this is as follows:

[0035] Because the image of the front of a vehicle captured by an in-vehicle high-definition camera is actually a two-dimensional image, it cannot reflect the actual positional relationship between various elements in the image. For example, in the first image captured by the in-vehicle high-definition camera, different objects may have overlapping areas, but the actual distance between them may be relatively far. In this case, if the colors of two objects are similar, pixel block segmentation based on color features may classify the two objects into the same pixel block, which may lead to the inability to identify the environmental elements corresponding to that pixel block. However, the embodiments of this application segment pixels by simultaneously considering the color features and the proximity of their actual spatial positions. Only when both color features and spatial positions are relatively similar are they considered as pixels in the same pixel block. This avoids the problem of classifying different objects into the same pixel block, thereby improving the accuracy of pixel block segmentation.

[0036] In this implementation, the feature difference between two adjacent pixels is calculated based on their color and position features. Adjacent pixels with a feature difference less than a first threshold are identified as pixels in the same pixel block. This means that adjacent pixels with similar color and position features are grouped into the same pixel block, thus improving the accuracy of pixel block segmentation. Then, it is determined whether at least one first pixel block includes a target pixel block. If the target pixel block is included, driving assistance information corresponding to the target pixel block is output to increase the driver's attention to preset environmental elements, thereby improving driving safety.

[0037] Optionally, the color features include: the brightness value of a first channel, the brightness value of a second channel, and the brightness value of a third channel; the position features include: a first coordinate value, a second coordinate value, and a third coordinate value; and the step of calculating the feature difference between any two adjacent pixels in the first image based on the color features and the position features includes:

[0038] The feature difference between any two adjacent pixels K and K+1 in the first image is calculated based on the following formula:

[0039]

[0040] Where, ΔA k,k+1 X is the feature difference between pixel K and pixel K+1. k+1 Let X be the first coordinate value of pixel K+1. k Let Y be the first coordinate value of pixel K. k+1 The second coordinate value of pixel K+1, Y k Z is the second coordinate value of pixel point K. k+1Z is the third coordinate value of pixel K+1. k R is the third coordinate value of pixel K. k+1 R is the brightness value of the first channel of pixel K+1. k G is the luminance value of the first channel of pixel K. k+1 G is the luminance value of the second channel of pixel K+1. k B is the luminance value of the second channel of pixel K. k+1 B is the luminance value of the third channel of pixel K+1. k This is the brightness value of the third channel of pixel K.

[0041] The brightness values ​​of the first, second, and third channels mentioned above can refer to the brightness values ​​of the RGB three channels. The first, second, and third coordinate values ​​can refer to three coordinate values ​​in a three-dimensional spatial coordinate system.

[0042] Thus, based on the distance calculation formula, the feature difference ΔA can be calculated. k,k+1 In one embodiment of this application, a position code (m, n) can be set for each pixel in the first image. This position code is used to mark the position of the pixel in the first image, facilitating the determination of any two adjacent pixels in the first image. For example, pixels (m, n) and (m, n+1) are vertically adjacent, and pixels (m, n) and (m+1, n) are horizontally adjacent. When calculating the feature difference between any two adjacent pixels in the first image, the pixel at the lower left corner of the first image can be used as the starting point. Two adjacent pixels can be searched to the right and upwards respectively, and then the feature difference between the starting point and the two adjacent pixels can be calculated. After the calculation is completed, the two adjacent pixels found are used as the starting point again, and two adjacent pixels are searched to the right and upwards respectively, and the feature difference is calculated. In this way, the feature difference between any two adjacent pixels in the first image can be calculated. In practical implementation, the feature difference ΔA between two adjacent pixels (m, n) and pixel (m+1, n) in the horizontal direction can be calculated based on the following formula. m,m+1 :

[0043]

[0044] Accordingly, the feature difference ΔA between two adjacent pixels (m, n) and pixel (m, n+1) in the vertical direction can be calculated based on the following formula. n,n+1 :

[0045]

[0046] The brightness values ​​of the aforementioned RGB three channels can range from 0 to 255, and the units of measurement for the first, second, and third coordinate values ​​can be millimeters. In this case, the first threshold can be 20, that is, when ΔA... m,m+1 When ΔA < 20, pixel (m, n) and pixel (m+1, n) are determined to be pixels in the same pixel block. n,n+1 When the value is less than 20, pixel (m, n) and pixel (m, n+1) are determined to be pixels in the same pixel block.

[0047] Specifically, an autoencoder can be pre-built. By inputting the color and position features of any two adjacent pixels into the autoencoder, the autoencoder can calculate the feature difference between the two pixels and determine whether any two adjacent pixels belong to the same pixel block based on the feature difference. Then, all pixels in the first image belonging to the same pixel block can be clustered, and a contour model of each first pixel block can be established. This completes the pixel block division process of the first image.

[0048] After completing the pixel block division process of the first image, each pixel in the first image can be labeled with the following information: (A, P, m, n, X, Y, Z, R, G, B, Code). Here, A represents the pixel block code, a code generated during the autoencoder's encoding process, where all pixels in the same pixel block have the same A value. P represents the image code, where all pixels in the same image have the same P value, used to identify the image to which the pixel belongs. (m, n) is the pixel's position code in the first image, used to locate the pixel's position within the first image. (X, Y, Z) are the image coordinates corresponding to the pixel in the three-dimensional coordinate system, used to identify the relative position of the image to the vehicle. R, G, and B represent the RGB three-channel brightness values ​​of the pixel, used to characterize the pixel's color information. Code is the pixel block type to which the pixel belongs. Before recognition, the Code can be a random value; after recognizing the pixel block based on the target model, the pixel's Code can be modified to reflect the recognition result. The Code values ​​corresponding to different types of pixel blocks can be predetermined, such as pedestrians (255), roadblocks (074), bicycles (187), electric vehicles (156), cars (143), trucks (172), sky (031), road surface (075), roadside walls (099), roadside trees (081), roadside buildings (043), roadside green belts (056), median strips (067), and traffic lights (125), etc. The term "pedestrian" (255) refers to a pixel block of type "pedestrian," where the Code value can be 255. The meanings of other pixel block types are similar to those of pedestrians, and will not be listed here to avoid repetition. Thus, by storing each pixel in the first image according to the aforementioned marking information, it facilitates image processing by the computer.

[0049] Optionally, before outputting the driving assistance information corresponding to the target pixel block, the method further includes:

[0050] Obtain the contour information and color information of the first pixel block;

[0051] The contour information and color information of the first pixel block are respectively input into the target model to obtain the first prediction type output by the target model. The first prediction type is used to characterize the type of the first pixel block.

[0052] If the first prediction type is a preset type, the first pixel block is determined as the target pixel block.

[0053] The target model can be a pre-trained model. Specifically, the target model can learn in advance the correspondence between the contour and color information of pixel blocks and the pixel block type. In this way, after the contour and color information of the first pixel block are input into the target model, the target model can predict the type of the first pixel block based on the contour and color information.

[0054] In this embodiment, the type of each first pixel block in the first image is predicted based on the target model. Based on the prediction results, it can be determined whether the first image includes the target pixel block.

[0055] Optionally, before inputting the contour information and color information of the first pixel block into the target model to obtain the first prediction type output by the target model, the method further includes:

[0056] Acquire training data, wherein the training data includes the contour information, color information and pixel block type of each second pixel block in the second image, the second image being an image of the vehicle's external driving environment, wherein the pixel block type is the true type of the second pixel block;

[0057] The target model is obtained by training a pre-built convolutional neural network model based on the training data.

[0058] The second image can be a historical image of the vehicle's external environment in various scenarios. Specifically, a large number of different second images can be acquired in advance. Then, contour and color information recognition is performed on each image to determine the contour and color information corresponding to each second image. Simultaneously, by determining the pixel block type of each second pixel block in each second image, a large amount of training data is obtained. The second pixel block can be any pixel block in the second image, and the process of acquiring the contour and color information of the second pixel block can be the same as the process of acquiring the contour and color information of the first pixel block. Correspondingly, the process of dividing the pixel blocks in the second image can be the same as the process of dividing the first pixel blocks in the first image; to avoid repetition, it will not be elaborated further here.

[0059] The convolutional neural network model can be any existing type of convolutional neural network model. For example, in one embodiment of this application, the convolutional neural network model can adopt a VGG-16 network structure. The shallow convolutional layers of the VGG-16 network structure can extract low-level image features, which may include linear features (such as lines, curves, or polylines) and planar features (such as contour features like circles, rectangles, triangles, and polygons). The deeper convolutional layers can extract higher-level semantic information, such as determining the type of pixel blocks based on their contours.

[0060] In this embodiment, the target model is obtained by training a pre-built convolutional neural network model based on the training data.

[0061] Optionally, training the pre-built convolutional neural network model based on the training data to obtain the target model includes:

[0062] The contour information and color information of the second pixel block are input into the convolutional neural network model to obtain the second prediction type output by the convolutional neural network model. The second prediction type is used to characterize the type of the second pixel block.

[0063] Obtain the target loss function, wherein the target loss function is a loss function constructed based on the second prediction type and the pixel block type;

[0064] The convolutional neural network model is trained based on the target loss function to obtain the target model.

[0065] The second prediction type can be represented as: y n = (b + w·x) n The target loss function can be expressed by the following expression:

[0066]

[0067] Wherein, L(f) and L(w,b) both represent the target loss function; This indicates the pixel block type, i.e., the actual type of the pixel block; y n and (b+w·x) n Both ) represent the second prediction type, i.e., the prediction type of the pixel block; x n This represents the Code value randomly assigned to the pixel block by the autoencoder. w and b are constants. Before model training, w and b can be manually assigned values. During training, the values ​​of w and b are continuously adjusted to improve the accuracy of the target model.

[0068] In this embodiment, the target model is obtained by constructing a target loss function and training the convolutional neural network model based on the target loss function.

[0069] Optionally, the step of outputting the driving assistance information corresponding to the target pixel block includes:

[0070] The image of the preset environmental element corresponding to the target pixel block is displayed according to the preset display method.

[0071] The outline information of the target pixel block can be displayed via an in-vehicle terminal. Specifically, only the image of the preset environmental element corresponding to the target pixel block in the first image can be displayed; alternatively, the first image can be displayed, with the image of the preset environmental element corresponding to the target pixel block highlighted within it. For example, the images of environmental elements not corresponding to the target pixel block in the first image can be statically displayed, while the image of the preset environmental element corresponding to the target pixel block is displayed in a flashing manner. Alternatively, the images of environmental elements not corresponding to the target pixel block in the first image can be displayed at normal proportions, while the image of the preset environmental element corresponding to the target pixel block is enlarged. This serves to draw the driver's attention to the preset environmental element corresponding to the target pixel block, thereby preventing the driver from missing important environmental information during driving and improving driving safety.

[0072] Please see Figure 2 The flowchart below illustrates a driving assistance method according to an embodiment of this application, specifically including the following steps: capturing a first image of the driving environment in front of the vehicle using an in-vehicle high-definition camera; simultaneously detecting the positions of environmental elements in the driving environment using an in-vehicle LiDAR to obtain the color and position features of each pixel in the first image; inputting the color and position features of each pixel in the first image into an autoencoder to obtain the contour and color information of each pixel block in the first image; inputting the contour and color information of each pixel block in the first image into a target model; predicting the type of each pixel block based on the contour and color information; sending the prediction result of the target model to an in-vehicle terminal; and displaying an image of the preset environmental elements corresponding to the target pixel block according to a preset display method on the in-vehicle terminal.

[0073] The specific implementation process of this embodiment is the same as that of the above embodiments, and it can achieve the same beneficial effects. To avoid repetition, it will not be described again here.

[0074] Optionally, after outputting the driving assistance information corresponding to the target pixel block, the method further includes:

[0075] The driving assistance information is transmitted to the vehicle's controller so that the controller can control the vehicle based on the driving assistance information.

[0076] Specifically, based on the method provided in the embodiments of this application, the obtained driving assistance information can also be applied to autonomous driving scenarios. By sending the driving assistance information to the controller, the controller can generate corresponding control commands based on the driving assistance information and information detected by other on-board sensors when automatically controlling the vehicle, so as to realize automatic control of the vehicle and thus improve the safety in the autonomous driving process.

[0077] Please see Figure 3 This is a schematic diagram of the structure of a driving assistance device 300 provided in an embodiment of this application. The device includes:

[0078] The first acquisition module 301 is used to acquire the color features and position features of each pixel in the first image, wherein the first image is an image of the external driving environment of the vehicle.

[0079] The calculation module 302 is used to calculate the feature difference between any two adjacent pixels in the first image based on the color features and the position features.

[0080] The first determining module 303 is used to determine any two adjacent pixels in the first image whose feature difference is less than a first threshold as pixels in the same pixel block, thereby obtaining at least one first pixel block.

[0081] The output module 304 is used to output driving assistance information corresponding to the target pixel block when the at least one first pixel block includes a target pixel block, wherein the target pixel block is a pixel block corresponding to a preset environmental element.

[0082] Optionally, the color features include: the brightness value of the first channel, the brightness value of the second channel, and the brightness value of the third channel; the position features include: the first coordinate value, the second coordinate value, and the third coordinate value; the calculation module 302 is specifically used to calculate the feature difference between any two adjacent pixels K and K+1 in the first image based on the following formula:

[0083]

[0084] Where, ΔA k,k+1 X is the feature difference between pixel K and pixel K+1. k+1 Let X be the first coordinate value of pixel K+1. k Let Y be the first coordinate value of pixel K. k+1 The second coordinate value of pixel K+1, Yk Z is the second coordinate value of pixel point K. k+1 Z is the third coordinate value of pixel K+1. k R is the third coordinate value of pixel K. k+1 R is the brightness value of the first channel of pixel K+1. k G is the luminance value of the first channel of pixel K. k+1 G is the luminance value of the second channel of pixel K+1. k B is the luminance value of the second channel of pixel K. k+1 B is the luminance value of the third channel of pixel K+1. k This is the brightness value of the third channel of pixel K.

[0085] Optionally, the device further includes:

[0086] The second acquisition module is used to acquire the contour information and color information of the first pixel block;

[0087] The input module is used to input the contour information and color information of the first pixel block into the target model respectively, and obtain the first prediction type output by the target model. The first prediction type is used to characterize the type of the first pixel block.

[0088] The second determining module is used to determine the first pixel block as the target pixel block when the first prediction type is a preset type.

[0089] Optionally, the device further includes:

[0090] The third acquisition module is used to acquire training data, wherein the training data includes the contour information, color information and pixel block type of each second pixel block in the second image, and the second image is an image of the vehicle's external driving environment.

[0091] The training module is used to train a pre-built convolutional neural network model based on the training data to obtain the target model.

[0092] Optionally, the training module includes:

[0093] The input submodule is used to input the contour information and color information of the second pixel block into the convolutional neural network model to obtain the second prediction type output by the convolutional neural network model. The second prediction type is used to characterize the type of the second pixel block.

[0094] An acquisition submodule is used to acquire a target loss function, wherein the target loss function is a loss function constructed based on the second prediction type and the pixel block type;

[0095] The training submodule is used to train the convolutional neural network model based on the target loss function to obtain the target model.

[0096] Optionally, the output module 304 is specifically used to display the image of the preset environmental element corresponding to the target pixel block according to a preset display method.

[0097] Optionally, the device further includes:

[0098] A transmitting module is used to transmit the driving assistance information to the vehicle's controller, so that the controller can control the vehicle based on the driving assistance information.

[0099] The driving assistance device 300 described above can implement the various processes in the above method embodiments and achieve the same technical effect. To avoid repetition, it will not be described again here.

[0100] This application also provides an electronic device, including: a processor, a memory, and a program stored in the memory and executable on the processor. When the program is executed by the processor, it implements the various processes of the above-described driving assistance method embodiments and achieves the same technical effects. To avoid repetition, it will not be described again here.

[0101] See Figure 4 As shown in the illustration, this application also provides an electronic device, including a bus 401, a transceiver 402, an antenna 403, a bus interface 404, a processor 405, and a memory 406. The processor 405 can implement the various processes of the above-described driving assistance method embodiments and achieve the same technical effects; therefore, to avoid repetition, it will not be described again here.

[0102] exist Figure 4 In this document, a bus architecture (represented by bus 401) is used. Bus 401 may include any number of interconnected buses and bridges, linking various circuits including one or more processors represented by processor 405 and memory represented by memory 406. Bus 401 may also link various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and therefore will not be described further herein. Bus interface 404 provides an interface between bus 401 and transceiver 402. Transceiver 402 may be a single element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices over a transmission medium. Data processed by processor 405 is transmitted over a wireless medium via antenna 403, which further receives data and transmits data to processor 405.

[0103] Processor 405 is responsible for managing bus 401 and general processing, and can also provide various functions, including timing, peripheral interface, voltage regulation, power management, and other control functions. Memory 406 can be used to store data used by processor 405 during operation.

[0104] Optionally, the processor 405 can be a CPU, ASIC, FPGA, or CPLD.

[0105] This application also provides a computer-readable storage medium storing a computer program. When executed by a processor, the computer program implements the various processes of the above-described method embodiments and achieves the same technical effects. To avoid repetition, it will not be described again here. The computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0106] It should be noted that, in this document, 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. Unless otherwise specified, 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 that element.

[0107] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or second terminal device, etc.) to execute the methods described in the various embodiments of this application.

[0108] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.

Claims

1. A driving assistance method, characterized in that, include: Obtain the color and position features of each pixel in the first image, wherein the first image is an image of the vehicle's external driving environment; Based on the color features and the position features, calculate the feature difference between any two adjacent pixels in the first image; In the first image, any two adjacent pixels whose feature difference is less than the first threshold are identified as pixels in the same pixel block, thus obtaining at least one first pixel block. If the first pixel block includes a target pixel block, the driving assistance information corresponding to the target pixel block is output, wherein the target pixel block is a pixel block corresponding to a preset environmental element; Before outputting the driving assistance information corresponding to the target pixel block, the method further includes: Obtain the contour information and color information of the first pixel block; The contour information and color information of the first pixel block are respectively input into the target model to obtain the first prediction type output by the target model. The first prediction type is used to characterize the type of the first pixel block. If the first prediction type is a preset type, the first pixel block is determined as the target pixel block.

2. The method according to claim 1, characterized in that, The color features include: the brightness value of the first channel, the brightness value of the second channel, and the brightness value of the third channel; the position features include: the first coordinate value, the second coordinate value, and the third coordinate value; and the step of calculating the feature difference between any two adjacent pixels in the first image based on the color features and the position features includes: The feature difference between any two adjacent pixels K and K+1 in the first image is calculated based on the following formula: ; in, The feature difference between pixel K and pixel K+1 The first coordinate value of pixel K+1 Let K be the first coordinate value. This is the second coordinate value of pixel K+1. This is the second coordinate value of pixel K. This is the third coordinate value of pixel K+1. This is the third coordinate value of pixel K. This represents the brightness value of the first channel of pixel K+1. This represents the brightness value of the first channel of pixel K. This represents the brightness value of the second channel of pixel K+1. This represents the brightness value of the second channel of pixel K. This is the brightness value of the third channel of pixel K+1. This is the brightness value of the third channel of pixel K.

3. The method according to claim 1, characterized in that, Before inputting the contour information and color information of the first pixel block into the target model to obtain the first prediction type output by the target model, the method further includes: Acquire training data, wherein the training data includes the contour information, color information and pixel block type of each second pixel block in the second image, and the second image is an image of the vehicle's external driving environment; The target model is obtained by training a pre-built convolutional neural network model based on the training data.

4. The method according to claim 3, characterized in that, The step of training a pre-built convolutional neural network model based on the training data to obtain the target model includes: The contour information and color information of the second pixel block are input into the convolutional neural network model to obtain the second prediction type output by the convolutional neural network model. The second prediction type is used to characterize the type of the second pixel block. Obtain the target loss function, wherein the target loss function is a loss function constructed based on the second prediction type and the pixel block type; The convolutional neural network model is trained based on the target loss function to obtain the target model.

5. The method according to claim 1, characterized in that, The step of outputting the driving assistance information corresponding to the target pixel block includes: The image of the preset environmental element corresponding to the target pixel block is displayed according to the preset display method.

6. The method according to claim 1, characterized in that, After outputting the driving assistance information corresponding to the target pixel block, the method further includes: The driving assistance information is transmitted to the vehicle's controller so that the controller can control the vehicle based on the driving assistance information.

7. A driving assistance device, characterized in that, include: The first acquisition module is used to acquire the color features and position features of each pixel in the first image, wherein the first image is an image of the vehicle's external driving environment. The calculation module is used to calculate the feature difference between any two adjacent pixels in the first image based on the color features and the position features. The first determining module is used to determine any two adjacent pixels in the first image whose feature difference is less than a first threshold as pixels in the same pixel block, thereby obtaining at least one first pixel block. The output module is configured to output driving assistance information corresponding to the target pixel block when the at least one first pixel block includes a target pixel block, wherein the target pixel block is a pixel block corresponding to a preset environmental element; The second acquisition module is used to acquire the contour information and color information of the first pixel block; The input module is used to input the contour information and color information of the first pixel block into the target model respectively, and obtain the first prediction type output by the target model. The first prediction type is used to characterize the type of the first pixel block. The second determining module is used to determine the first pixel block as the target pixel block when the first prediction type is a preset type.

8. An electronic device, characterized in that, include: A processor, a memory, and a program stored in the memory and executable on the processor, wherein the program, when executed by the processor, implements the steps of the method as described in any one of claims 1 to 6.

9. A computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Moving object recognition method, early-warning method and automobile rear-end collision prevention early-warning device

    CN107798688A