Method and device for determining the distance between an object and a vehicle by using a bounding box and a local depth prediction model.

FR3163480B1Active Publication Date: 2026-05-01STELLANTIS AUTO SAS +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
FR · FR
Patent Type
Patents
Current Assignee / Owner
STELLANTIS AUTO SAS
Filing Date
2024-06-17
Publication Date
2026-05-01
Patent Text Reader

Abstract

A method or device for determining the distance between an object and a vehicle equipped with a vision system comprising first and second cameras. The distance is determined from depths predicted by a local depth prediction model selected from a plurality of such models. The depths are predicted for pixels of a bounding box associated with the object in an acquired image. The local depth prediction model is learned from training images containing training objects. These objects are detected (32), bounding boxes are determined, and a window size is defined (34) to be larger than the various bounding boxes. Local depth prediction models are then learned (37), each local model being associated with a window covering a portion of an image acquired by a camera. Figure 3 (for the abstract)
Need to check novelty before this filing date? Find Prior Art

Description

Title of the invention: Method and device for determining the distance between an object and a vehicle by using a bounding box and a local depth prediction model. technical field

[0001] The present invention relates to methods and devices for determining the distance separating an object from a vision system mounted in a vehicle, for example in a motor vehicle.

[0002] The present invention also relates to a method and device for predicting the depth associated with a pixel of an image acquired by a vision system embedded in a vehicle. Technological background

[0003] Many modern vehicles are equipped with Advanced Driver-Assistance Systems (ADAS). These ADAS are passive and active safety systems designed to eliminate human error in driving all types of vehicles. ADAS use advanced technologies to assist the driver while driving and thus improve performance. ADAS use a combination of sensor technologies to perceive the environment around a vehicle and then provide information to the driver or act on certain vehicle systems.

[0004] There are several levels of ADAS, such as reversing cameras and blind spot sensors, lane departure warning systems, adaptive cruise control or automatic parking systems.

[0005] The AD AS systems embedded in a vehicle are powered by data obtained one or more on-board sensors such as, for example, cameras. These cameras make it possible to detect and locate other road users or any obstacles present around a vehicle in order, for example: - to adapt the vehicle's lighting according to the presence of other users; - to automatically regulate the vehicle's speed; - to act on the braking system in case of risk of impact with an object.

[0006] The quality of the data emitted by a vision system therefore determines the proper functioning of the driving assistance devices using this data.

[0007] A vision system installed in a vehicle makes it possible to determine the depth or distance separating the vehicle from an object in the vehicle's environment. However, when a vehicle is moving at high speed, For example, on the highway, depth prediction time is critical. Indeed, the reaction time of an ADAS (Advanced Driver Assistance System) depends on image processing time and the depth prediction time of the predictive model associated with the vision system. This latter time must therefore be reduced to allow the vehicle, via the ADAS controls, to react quickly and effectively. Summary of the present invention

[0008] One object of the present invention is to solve at least one of the problems of the technological background described above.

[0009] Another object of the present invention is to improve the quality of data from the processing of an image acquired by a vision system, in particular by a depth prediction model implemented by a neural network associated with a stereoscopic vision system, which is learned so as to be accurate even for highly distorted images.

[0010] Another object of the present invention is to improve the processing speed of an image acquired by a vision system, in particular by limiting the area of ​​the image processed to predict a depth associated with pixels or a distance associated with an object. The vision system is then more efficient, making ADAS using data from this vision system more responsive.

[0011] Another object of the present invention is to improve road safety, in particular by improving the reliability of ADAS systems powered by data obtained from a vision system.

[0012] According to a first aspect, the present invention relates to a method for determining the distance separating a current object from a vehicle carrying a vision system comprising a first and a second camera arranged so as to each acquire an image of a current three-dimensional scene including the current object, the distance being determined from depths predicted by a local depth prediction model selected from a plurality of local depth prediction models, the depths being predicted for pixels of a bounding box associated with a set of pixels corresponding to the current object in a current image acquired by the first camera, the method being implemented by at least one processor, and being characterized in that the local depth prediction model is learned in a learning phase comprising the following steps: - reception of pairs of training images, each pair of training images comprising a first image acquired by the first camera and a second image acquired by the second camera; - for each pair of training images, identification of pixels corresponding to a training object in each image of a pair of images and determination for the training object of a bounding box in the first image; - for each learning object, determination of a distance associated with the learning object from depths predicted for pixels included in the bounding box associated with the learning object, called first pixels, from the first pixels and pixels of the second image, called second pixels, corresponding to the first pixels, the depths being predicted by a global depth prediction model associated with the vision system; - determination of a window dimension from bounding box dimensions determined for a set of learning objects including each learning object for which the associated distance is greater than a threshold distance; - generation of a set of windows covering the entirety of each first image, each window in the set of windows having the dimension of a window, and each local depth prediction model of the plurality of local depth prediction models being associated with a different window of the plurality of windows; - for each learning object in the set of learning objects: • selection of a window from the set of windows, the center of the window being the closest to the center of the first bounding box associated with each learning object among the centers of the windows in the set of windows; • learning the local depth prediction model associated with the selected window from the first and second pixels.

[0013] Such a process makes it possible to process only pixels associated with a current object, the processing time of an image is therefore considerably reduced compared to the time required to process the entire image, the local depth prediction model being used only on a limited number of pixels.

[0014] Local depth prediction models improve accuracy and are particularly well-suited to images with high distortion. Indeed, the same object located at the same distance from the vehicle has a different appearance depending on the location of its corresponding pixels in a highly distorted image.

[0015] According to an embodiment of the method, the centers of the windows in the window set are distributed according to a grid defined in each first image along a horizontal direction and a vertical direction, the horizontal distance between two consecutive window centers along the horizontal direction being equal to half the width of a window and the vertical distance between two window centers consecutive along the vertical direction being equal to half the height of a window.

[0016] According to a variant of the method, the step of learning the local depth prediction model is carried out in a supervised manner.

[0017] According to another variant of the method, the local depth prediction model learning step is carried out in a self-supervised manner and further comprises the following steps: • generation of a third image from the first image and depths predicted by a local depth prediction model for pixels of the first image, and of a fourth image from the second image and predicted depths, and • minimization of an error determined by comparing said third image and the second image and by comparing the fourth image and the first image.

[0018] According to yet another variant of the method, determining the distance separating the current object from the vehicle further comprises the following steps: - reception of the first current image and a second current image acquired by the second camera; - identification of pixels corresponding to the current object in the first current image and determination of a current bounding box including the pixels corresponding to the current object; - prediction of depths associated with pixels of the current bounding box by a local depth prediction model, the local depth prediction model being selected from the plurality of local depth prediction models based on the position of a center of the current bounding box; and - determination of the distance separating the current object from the vehicle from the depths associated with pixels of the current bounding box.

[0019] According to a further variant of the method, the distance separating the current object from the vehicle is equal to an average of the depths associated with the pixels of the current bounding box.

[0020] According to yet another variant, the method further comprises, for a pair of training images, a step of determining a set of target pixels in the second image of the pair of training images, each target pixel being an image of a reference pixel of the first image of the pair of training images whose coordinates in the second image are determined by a transformation function applied to the reference pixel for different depth values, the different depth values ​​each being greater than the threshold depth, the window dimensions being determined from the dimensions of a box encompassing the set of target pixels.

[0021] According to yet another variant of the method, when at least two bounding boxes associated with at least two learning objects include pixels in common, then the at least two learning objects are not included in the set of learning objects.

[0022] According to a second aspect, the present invention relates to a device for determining the distance separating a common object from a vehicle by means of a vision system, the device comprising a memory associated with at least one processor configured for the implementation of the steps of the method according to the first aspect of the present invention.

[0023] According to a third aspect, the present invention relates to a vehicle, for example of the automobile type, comprising a device as described above according to the second aspect of the present invention.

[0024] According to a fourth aspect, the present invention relates to a computer program which includes instructions adapted for carrying out the steps of the process according to the first aspect of the present invention, in particular when the computer program is executed by at least one processor.

[0025] Such a computer program may use any programming language and be in the form of source code, object code, or an intermediate form between source code and object code, such as in a partially compiled form, or in any other desirable form.

[0026] According to a fifth aspect, the present invention relates to a computer-readable recording medium on which is recorded a computer program comprising instructions for carrying out the steps of the process according to the first aspect of the present invention.

[0027] On the one hand, the recording medium can be any entity or device capable of storing the program. For example, the medium can include a storage means, such as a ROM, a CD-ROM or a microelectronic circuit-type ROM, or a magnetic recording means or a hard disk drive.

[0028] On the other hand, this recording medium can also be a transmissible medium such as an electrical or optical signal, such a signal being able to be transmitted via an electrical or optical cable, by conventional or radio frequency, by self-directing laser beam, or by other means. The computer program according to the present invention can, in particular, be downloaded from an Internet-type network.

[0029] Alternatively, the recording medium may be an integrated circuit in which the computer program is incorporated, the integrated circuit being adapted to execute or to be used in the execution of the process in question. Brief description of the figures

[0030] Other features and advantages of the present invention will become apparent from the description of the particular and non-limiting embodiments of the present invention below, with reference to the attached Figures 1 to 6, in which:

[0031] [Fig-1] schematically illustrates a vision system equipping a vehicle, according to a a particular and non-limiting example of a realization of the present invention;

[0032] [Fig.2] illustrates a flowchart of the different steps of a method for determining a distance separating a common object from the vehicle in [Fig.1] by a local depth prediction model, according to a particular and non-limiting embodiment of the present invention;

[0033] [Fig.3] illustrates a flowchart of the different stages of a method for learning the local depth prediction model used in the method of [Fig.2], according to a particular and non-limiting example of the present invention;

[0034] [Fig.4] schematically illustrates a grid having windows in an image acquired by a camera of the vision system on board the vehicle of [Fig.1], according to a particular and non-limiting embodiment of the present invention;

[0035] [Fig.5] schematically illustrates a window associated with a bounding box determined for pixels corresponding to an object of a three-dimensional scene observed by a camera of the vehicle's vision system of [Fig.1], according to a particular and non-limiting embodiment of the present invention;

[0036] [Fig. 6] schematically illustrates a device configured to determine the depth of a pixel of an image acquired by a vision system embedded in the vehicle of [Fig. 1], according to a particular and non-limiting embodiment of the present invention; and

[0037] [Fig. 7] schematically illustrates a box encompassing a set of target pixels in a second image associated with a reference pixel in a first image, according to a particular and non-limiting embodiment of the present invention. Description of embodiment examples

[0038] A method and device for determining the distance between a common object and a vehicle carrying a vision system will now be described in what follows with joint reference to Figures 1 to 6. The same elements are identified with the same reference signs throughout the description that follows.

[0039] The terms "first," "second" (or "firsts," "seconds"), etc., are used in this document by arbitrary convention to allow for the identification and distinction of different elements (such as operations, means, etc.) implemented in the embodiments described below. Such elements may be distinct or correspond to a single element, depending on the embodiment.

[0040] Fig. 1 schematically illustrates a vision system equipping a vehicle, according to a particular and non-limiting embodiment of the present invention.

[0041] Such an environment 1 corresponds, for example, to a road environment consisting of a network of roads accessible to the vehicle 10.

[0042] In this example, vehicle 10 corresponds to a vehicle with an internal combustion engine, an electric motor(s), or a hybrid vehicle with an internal combustion engine and one or more electric motors. Vehicle 10 thus corresponds, for example, to a land vehicle such as a car, a truck, a bus, or a motorcycle. Finally, vehicle 10 corresponds to an autonomous or non-autonomous vehicle, that is to say, a vehicle operating according to a predetermined level of autonomy or under the total supervision of the driver.

[0043] The vehicle 10 advantageously comprises at least two on-board cameras, a first camera 11 and a second camera 12, configured to acquire images of a three-dimensional scene unfolding in the environment of the vehicle 10 from distinct observation positions. The first camera 11 and the second camera 12 form a stereoscopic vision system when used together, as illustrated in [Fig. 1]. The first camera 11 forms a monoscopic vision system when used alone, and similarly, the second camera 12 forms another monoscopic vision system when used alone. The present invention, however, extends to any vision system comprising at least two cameras, for example, 2, 3, or 5 cameras.

[0044] The intrinsic parameters of the first camera 11 characterize the transformation which associates, for an image point, hereafter called "point", its three-dimensional coordinates in the reference frame of the first camera 11 with the pixel coordinates in an image acquired by the first camera 11. These parameters do not change if the first camera 11 is moved. The intrinsic parameters of the first camera 11 include in particular a first focal length fl associated with the first camera 11.

[0045] The intrinsic parameters of the second camera 12 characterize the transformation that associates, for an image point, its three-dimensional coordinates in the frame of reference of the second camera 12 with the pixel coordinates in an image acquired by the second camera 12. These parameters do not change if the second camera 12 is moved. The intrinsic parameters of the second camera 12 include in particular a second focal length f2 associated with the second camera 12.

[0046] Distortions, which are due to imperfections in the optical system such as defects in the shape and positioning of the camera lenses, will deflect the light beams and thus induce a positioning error for the projected point relative to an ideal model. It is then possible to complete the camera model by introducing the three distortions that generate the most significant effects, namely radial, decentering, and prismatic distortions, induced by defects in the curvature and parallelism of the lenses and the coaxiality of the optical axes.

[0047] According to a particular embodiment, the first camera 11 and / or the second camera 12 is of the "wide-angle" type, a wide-angle camera being, for example, equipped with a lens designed to acquire a representative image of a three-dimensional scene seen over a wider field of view than a standard camera, also sometimes called a panoramic lens. In other words, a wide-angle lens makes it possible to capture a larger portion of the three-dimensional scene unfolding in front of or around the camera, which is particularly useful in situations where it is necessary to include more elements in the frame of the image acquired by that camera. The angle α of the field of view of the first camera 11 is, for example, equal to 120°, 145°, 180°, or 360°, whereas a standard camera offers, for example, a field of view open at an angle of 45° or less.Such a first camera 11 corresponds, for example, to a camera equipped with mirrors or a "fisheye" camera. Wide-angle lenses have a shorter focal length compared to standard lenses, making them suitable for capturing images of landscapes, architecture, road intersections, or any other subject requiring a wide perspective. Wide-angle cameras are, for example, used to capture immersive and dynamic images with an extended depth of field.

[0048] These two cameras 11, 12 are arranged so that each acquires an image of a scene from a different viewpoint. The first viewpoint is, for example, located on or in the left-hand rearview mirror of the vehicle 10 or at the top of the windshield of the vehicle 10. The second viewpoint is, for example, located on or in the right-hand rearview mirror of the vehicle 10 or at the top of the windshield of the vehicle 10. If both cameras are located at the top of the windshield of the vehicle, they are then positioned at a certain distance. In this example, the first camera 11 is located at the top of the windshield of the vehicle 10, and the second camera 12 is located in the right-hand rearview mirror of the vehicle 10.

[0049] A first marker is associated with the first camera 11: - the direction of the x-axis is defined as horizontal and normal to the optical axis of the first camera 11. The distance B separating the optical center of the first camera 11 from the projection of the optical center of the second camera 12 onto the horizontal plane passing through the optical center of the first camera 11 is called the reference basis (in English "baseline"); - the direction of the y-axis is defined as vertical and normal to the optical axis of the first camera 11; - The direction of the z-axis is defined as orthogonal to the directions of the x and y axes. The three axes x, y and z thus form an orthonormal coordinate system.

[0050] The extrinsic parameters related to the position of cameras 11, 12 are the following parameters: - three translations in the x, y, and z directions: Tx, Ty, and Tz, constituting the translation vector T; and - three rotations in the x, y and z directions: 0x, 0y and 0z.

[0051] An extrinsic matrix of the vision system then includes the extrinsic parameters previously defined.

[0052] The extrinsic parameters are determined, for example, during a calibration phase of the stereoscopic vision system comprising the first camera 11 and the second camera 12.

[0053] A key constraint of stereoscopic vision systems used in automobiles is, for example, the large distance between the two cameras. Indeed, to cover a measurement range of 200 meters, the reference base must be 60 cm for cameras commonly used in this field.

[0054] The two cameras 11, 12 acquire images of a scene located in front of the vehicle 10, the first camera 11 alone covering a first acquisition field 13, the second camera 12 alone covering a second acquisition field 14 and the two cameras 11, 12 both covering a third acquisition field 15. The first and third acquisition fields 13, 15 thus allow a monoscopic view of the scene by the first camera 11, the second and third acquisition fields 14, 15 allow a monoscopic view of the scene by the second camera 12 and the third acquisition field 15 allows a stereoscopic view of the scene by the stereoscopic vision system composed of the two cameras 11, 12.

[0055] An obstacle 18 is placed in the acquisition field of the cameras, for example in the third acquisition field 15. The presence of the obstacle 18 defines an occlusion field for the stereoscopic vision system composed here of the three fields 16, 17 and 19.

[0056] Among these three fields, field 16 is visible from the second camera 12. The part of the scene present in this field 16 is therefore observable using the monoscopic vision system comprising the second camera 12.

[0057] The field 17 is visible from the first camera 11. The part of the scene present in this field 17 is therefore observable using the monoscopic vision system comprising the first camera 11.

[0058] Finally, field 19 is not visible to any of the cameras. The part of the scene present in this field 19 is therefore not observable.

[0059] According to one particular embodiment, the field of view of the second camera 12 covers at least half of the field of view of the first camera 11.

[0060] It is evident that it is possible to use such a stereoscopic vision system to take images of scenes located on the sides or behind the vehicle 10 by equipping it with cameras placed and oriented differently.

[0061] The images acquired by the cameras 11, 12 at a given acquisition time are in the form of data representing pixels characterized by: - ​​coordinates in each image; and - data relating to the colours and brightness of objects in the observed scene in the form of, for example, RGB colourimetric coordinates (from the English "Red Green Blue", in French "Rouge Vert Bleu") or HSL (Tone, Saturation, Luminosity).

[0062] According to a particular embodiment, an image acquired by the first camera 11 and / or by the second camera 12 includes a distortion equal to 0.5%, 0.8% or greater than 1%. The measurement of such distortion corresponds to the determination of a ratio between: - the maximum spacing of a pixel in the image of a straight line in the first three-dimensional scene whose image is a line touching the longest edge of the first image, either at the center of the image edge or at the corners of the image edge, and - the length of this edge.

[0063] In the world of photography, distortion is commonly considered to be: • negligible if it is less than 0.3%, • not very sensitive if it is between 0.3% or 0.4%, • sensitive if it is between 0.5% and 0.6%, • very sensitive if it is between 0.7% and 0.9%, and • problematic if it is greater than or equal to 1% or more.

[0064] Barrel distortion is characterized by a positive percentage, while crescent distortion is characterized by a negative percentage.

[0065] Each pixel of the acquired image represents an object in the three-dimensional scene present in the camera's field of view. Indeed, a pixel of the acquired image is the smallest visible unit and corresponds to a point of light resulting from the emission or reflection of light by a physical object present in the three-dimensional scene. When light strikes this object, photons are emitted or reflected, which are captured by a photosensitive sensor of the camera after passing through its lens. This sensor divides the three-dimensional scene into a grid of pixels. Each pixel records the light intensity at a specific location, thus capturing visual details. The combination of millions of pixels creates an image that faithfully represents the physical object observed by the camera. An image point described above is therefore a point on the surface of an object in the three-dimensional scene.

[0066] The images acquired by cameras 11, 12 represent views of the same scene taken from different viewpoints, the camera positions being distinct. This scene includes, for example: - buildings; - road infrastructure; - other stationary users, for example a parked vehicle; and / or - other mobile users, for example another vehicle, a cyclist or a moving pedestrian.

[0067] According to a particular embodiment, a field of view of the first camera 11 covers at least half of a field of view of the second camera 12, and a field of view of the second camera 12 covers at least half of a field of view of the first camera 11. In other words, more than half of the pixels of an image acquired by the first camera 11 correspond to an object in the three-dimensional scene seen by the second camera 12, and pixels of an image acquired by the second camera 12 also correspond to this object in the three-dimensional scene. Similarly, more than half of the pixels of an image acquired by the second camera 12 correspond to an object in the three-dimensional scene seen by the first camera 11, and pixels of an image acquired by the first camera 11 also correspond to this object in the three-dimensional scene.

[0068] The images acquired by the first camera 11 and by the second camera 12 are sent to a computer of a device equipping the vehicle 10 or stored in a memory of a device accessible to a computer of a device equipping the vehicle 10.

[0069] A method for determining the distance between a common object and a vehicle equipped with a vision system is advantageously implemented by the vehicle 10, i.e. by a processor, a computer or a combination of computers of the vehicle's embedded system 10, for example by the computer(s) in charge of the vehicle's vision system 10.

[0070] Figure 2 illustrates a flowchart of the different steps of a method 2 for determining the distance between a common object and a vehicle equipped with a vision system, for example, vehicle 10 of Figure 1. The vision system onboard vehicle 10 comprises a first and a second camera arranged to each acquire an image of a common three-dimensional scene, i.e., one taking place in the vicinity of vehicle 10. This common three-dimensional scene includes, in particular, a common object located in the field of vision of the first and second cameras, i.e., in the third acquisition field 15 shown opposite Figure 1. The method 2 is implemented, for example, by a device of the vision system onboard vehicle 10 or by device 6 of Figure 6.

[0071] According to a particular embodiment, process 2 comprises the following steps.

[0072] In a step 21, a first current image acquired by the first camera 11 and a second current image acquired by the second camera 12 are received. The reception of these images consists of receiving data representative of these images. These first and second current images are acquired respectively by the first camera 11 and by the second camera 12 at the same acquisition time instant. They thus represent the same three-dimensional scene, called the current three-dimensional scene, observed from two distinct viewpoints at the same acquisition time instant.

[0073] According to a particular embodiment, the first current image and second current image are of the same definition, that is to say they have the same number of pixels, have the same number of pixels according to their height and the same number of pixels according to their width and a large part of each current image represents the same part of the current three-dimensional scene.

[0074] According to another particular embodiment, the first and second images are not of the same resolution and / or only a small portion of each current image represents the same part of the current three-dimensional scene. An additional step then consists of resizing or cropping them to obtain a first and second current image of the same resolution and whose pixels correspond predominantly to the same part of the current three-dimensional scene; for example, more than 80% of the pixels of each current image represent the same part of the current three-dimensional scene as seen by the two cameras.

[0075] If the cameras are calibrated, for example by following a calibration method known to those skilled in the art such as that presented in the document "Single View Point Omnidirectional Camera Calibration from Planar Grids", written by Christopher Mei and Patrick Rives and published in April 2007, then the intrinsic parameters of the first and second cameras 11,12 are known. Borders of the common field of view can be identified in the first and second current images by a simulation using a back-projection and projection program, which are described below.

[0076] The rear projection program performs the following operations: • The pixel coordinates are corrected to remove distortion defined by distortion parameters: the parameter of the model presented in the cited document, called the Mei model, and distortion coefficients kh k2, k3, pi and p2, the definition of which can be found in the free library OpenCV® for example. • The coordinates are projected onto the unit sphere according to the Mei model. • Projection lines are calculated, always according to the Mei model. • Projection lines are multiplied by a depth.

[0077] The projection program then proceeds by performing the following operations: • The coordinates of the points in space are transformed into the coordinate system of the other image. • The coordinates of the points in space are modified via the distortion function defined by the same parameters as those mentioned previously. • Multiplication with the inverse of the intrinsic matrix similar to the pinhole camera lens.

[0078] By associating a depth corresponding to the midpoint of a measurement range, for example 100 m (one hundred meters) for a measurement range from 10 m (ten meters) to 200 m (two hundred meters), with the pixels of the first current image, and by backprojecting and projecting the first current image onto the second current image with this depth, the simulation makes it possible to determine the average edge of the shared field of view on the second current image. The first current image is to be cropped with the same resolution as the cropped second current image, and on the opposite side along a diagonal to the cropping side of the second current image.

[0079] If the first and second cameras are not calibrated, the projection and reprojection models are defined by a neural network such as that described in the paper "Neural Ray Surfaces for Self-Supervised Learning of Depth and Ego-motion" by Igor Vasiljevic, Vitor Guizilini, Rares Ambrus, Sudeep Pillai, Wolfram Burgard, Greg Shakhnarovich, and Adrien Gaidon, published in August 2020. This particular embodiment is well suited to the acquired images. by the vision system cameras and exhibiting significant distortions. It is not possible to determine the exact crop before training. The common field of view in the first and second current images can be found using a trial-and-error method, starting with a crop based on observation of the current images and training the projection and reprojection models to improve their efficiency. If the pixels at the edge of the first and second images do not have a reasonable prediction, for example, with a value that is too high or too low, or when a depth map does not match the texture of an original image, the size of the cropped image must be reduced. If some of the pixels, preferably half, have reasonable predictions while others do not, the correct crop is found.

[0080] In a step 22, pixels corresponding to the current object are detected in the first current image and a current bounding box is determined, the current bounding box comprising the pixels corresponding to the current object.

[0081] In a step 23, depths associated with pixels of the current bounding box are predicted by a local depth prediction model. In particular, the local depth prediction model is selected from among a plurality of local depth prediction models based on the position of the center of the current bounding box.

[0082] Indeed, each local depth prediction model is attached to a set of pixels in the first current image forming a rectangular window. The selected local depth prediction model is then the one for which the center of the pixel window to which it is attached is closest to the center of the current bounding box. A local depth prediction model is a depth prediction model capable of predicting depths for pixels in the first current image and particularly accurate for pixels located in its associated window. Indeed, the local depth prediction model was learned in a training phase corresponding, for example, to the learning process 3 described below with reference to [Fig. 3].This local depth prediction model is learned from training images containing pixels corresponding to training objects similar to the current object and positioned within the selected window. Thus, the local depth prediction model is particularly accurate at predicting the depth of a pixel located within the selected window, a window that includes the pixels to which it is attached.

[0083] Note that the plurality of local depth prediction models covers the entirety of the first current image so as to offer a local depth prediction model for a current object located anywhere in the first current image.

[0084] The depths are then predicted by the local depth prediction model from the pixels of the first current image included in the current bounding box and from pixels of the second current image corresponding to the pixels of the first current image included in the current bounding box.

[0085] In a step 24, the distance separating the current object from the vehicle 10 is determined from the depths associated with the pixels of the current bounding box.

[0086] The distance separating the current object from the vehicle 10 is, for example, equal to an average of the depths associated with pixels of the current bounding box, for example, the average of the depths determined for all pixels of the current bounding box or the average of a portion of the pixels of the current bounding box. The portion of pixels of the current bounding box represents, for example, one-quarter of the pixels contained within this bounding box, for example by selecting a subset of pixels in a reduced window having a reduced width equal to half the width of the selected window and a reduced height equal to half the height of the selected window, the reduced window being centered on the selected window.

[0087] If the ADAS uses these depths or distances as input data to determine the distance between a part of the vehicle 10, for example the front bumper, and another road user, the ADAS is then able to determine this distance precisely and act accordingly. For example, if the ADAS is designed to activate the braking system of the vehicle 10 in the event of a risk of collision with another road user, and the distance between the vehicle 10 and that road user decreases sharply, then the ADAS is able to detect this sudden closeness and activate the braking system of the vehicle 10 to avoid a possible accident.

[0088] Figure 3 illustrates a flowchart of the different stages of a method for learning the local depth prediction model used in a method for determining the depth of a pixel of an image and / or in a method for determining the distance separating a vehicle from an object, for example in method 2 of Figure 2, according to a particular and non-limiting embodiment of the present invention.

[0089] The learning process 3 is for example implemented by the device on board the vehicle 10 implementing the process of determining a distance separating an object from the vehicle 10 or by the device 6 of the [Fig.6].

[0090] In a step 31, pairs of training images are received, each pair of training images comprising a first image 41 acquired by the first camera 11 and a second image acquired by the second camera 12 at the same time instant of acquisition.

[0091] The image pairs are for example acquired by the vision system of the vehicle 10 previously.

[0092] According to one particular embodiment, the images of the training image pairs were pre-filtered to be relevant for the execution of the learning process 3.

[0093] As with method 2, a resizing or cropping step of the images acquired by the first and second cameras is carried out so as to retain parts of the images corresponding to a part of the three-dimensional scene observed by both the first camera 11 and the second camera 12.

[0094] In a step 32 and as illustrated in [Fig.5], for each pair of training images, pixels corresponding to at least one training object O are identified in each image of a pair of images and a bounding box B is determined in the first image 41 for each detected training object, i.e. for each set of pixels corresponding to at least one training object.

[0095] Note that, according to one variant, the type of object is detected and the images are filtered according to a particular type of object. For example, only vehicle-type objects such as trucks, motorcycles, and cars are processed in the next stage of the learning process 3.

[0096] In a step 33, for each training object, a distance associated with the training object is determined from depths predicted for pixels within the bounding box B associated with the training object, referred to as first pixels, and from pixels of the second image, referred to as second pixels, corresponding to the first pixels. The depths are predicted by a global depth prediction model associated with the vision system.

[0097] The global depth prediction model is a depth prediction model capable of predicting the depth associated with any pixel of the first training image or the first cropped training image. This model gives rise to the various local depth prediction models, with the difference that the local depth prediction models are not learned on all the images but each for pixels corresponding to objects located in specific areas of the images.

[0098] According to a particular embodiment, the overall depth prediction model is to be trained with the pairs of training images, in particular after cropping the latter where appropriate.

[0099] The distance associated with the learning object is determined or calculated by averaging the depth values ​​predicted by the global depth prediction model for the pixels included in the bounding box.

[0100] To avoid the impact of the environment, the calculation is done, for example, in a smaller area in the center of the bounding box, for example with 50% width and 50% height.

[0101] The learning objects for which the determined distances are greater than a threshold distance then form a set of learning objects. The threshold distance then corresponds to a distance that allows us to classify objects as distant. Such a threshold distance is, for example, equal to 100m (one hundred meters).

[0102] According to a particular embodiment, when at least two bounding boxes associated with at least two training objects share pixels, then the at least two training objects are not included in the set of training objects. In other words, in the case of overlapping bounding boxes, all overlapping bounding boxes are discarded to avoid mixing multiple objects in the computation.

[0103] In a step 34, a window dimension is determined from the dimensions of the bounding boxes determined for the previously constituted set of learning objects.

[0104] The window dimension is, for example, defined such that the width of the window is greater than or equal to the width of the widest bounding box and such that the height of the window is greater than or equal to the height of the tallest bounding box. Note that by being larger than the sum of all the bounding boxes, the dimension of such a window subsequently reduces machine memory consumption.

[0105] According to a particular embodiment illustrated in [Fig. 7], the learning process 3 includes a step of determining, for a pair of training images, a set of target pixels in the second image 42 of the pair of training images, each target pixel 421 being an image of a reference pixel 411 of the first image 41 of the pair of training images, the coordinates of which in the second image 42 are determined by a transformation function applied to the reference pixel 411 for different depth values. The different depth values ​​are each greater than the threshold depth, for example, between 100m and 200m (one hundred meters and two hundred meters) in steps of 10m (ten meters).

[0106] The window size is then also determined from the dimensions of a bounding box B42i encompassing the set of target pixels, that is, from its width L42i and its height H42[. The width of the window is then greater than the width L42[ of this bounding box B42[ and the height of the window greater than the height H42i. Of the bounding box B42[.

[0107] Note that the reference pixel 411 is, for example, the pixel located at the top left of the first image 41. Indeed, in the event of distortion, a pixel located in a corner of the first image is more sensitive to it.

[0108] In a step 35, a set of windows covering the entirety of each first image 41 is generated. Each window in this set of windows then has the same dimensions as the previously determined window dimension. Each local depth prediction model of the plurality of local depth prediction models is then associated with a different window from the plurality of windows.

[0109] According to a particular embodiment illustrated in [Fig.4], the centers of the windows of the window set are distributed according to a grid G ​​defined in each first image 41 along a horizontal direction and a vertical direction, a horizontal distance between two consecutive window centers along the horizontal direction being equal to half the width of a window and a vertical distance between two consecutive window centers along the vertical direction being equal to half the height of a window.

[0110] In other words, this grid G ​​allows the creation of a series of windows with a 50% overlap in width and height. A window F is designated by a vector of 4 elements: (x, y, h, w), where x and y are the coordinates of the top-left corner of window F, and h and w are the height HF and width LF of the window, respectively. This overlap is necessary to avoid the case where the bounding box passes through two adjacent windows without overlapping. Two consecutive vertical axes of grid G ​​are then spaced half the window height HF / 2 apart, and two consecutive horizontal axes of grid G ​​are then spaced half the window width LF / 2 apart.

[0111] Note that the distortion parameters, the Mei model parameter, and the distortion coefficients kb, k2, k3, pi and p2 do not change for the windows, while the coordinates of the image center must be adapted for each window:

[0112] [Math.l] c{^C^-Xj el4 = ^-v..

[0113] With: • and the coordinates of the optical center of the original image, • % and c'y are the coordinates of the optical center of window i, and • xi and y{ the coordinates of the top left corner of window i.

[0114] The adaptation aims to keep the optical center in the original position in the entire image knowing that the origin of the coordinates of a pixel in the original and / or cropped image is always the top left corner in python®.

[0115] In a step 36, as illustrated in [Fig. 5], for each learning object in the set of learning objects, a window F is selected from the set of windows. The center CF of the window F is the closest, among the centers of the windows in the set of windows, to the center CB of the first bounding box B associated with the learning object.

[0116] In a step 37, for each learning object in the set of learning objects, the local depth prediction model associated with the window F selected for the learning object is learned from said first and second pixels.

[0117] It should be noted that each local depth prediction model is derived from the global depth prediction model, and then learned separately so as to be more accurate in a particular area of ​​the image defined by the position of the center of the window associated with the local depth prediction model.

[0118] The training must be performed for all windows with the appropriate camera parameters. The output of this step is a series of local depth prediction models adapted in particular to a non-parallel stereoscopic vision system with image distortion.

[0119] According to a first particular embodiment, the training of the local depth prediction model, as well as previously the training of the global depth prediction model, is done by supervised machine learning as done by the model called Unimatch® presented in the document "Unifying Flow, Stereo and Depth Estimation" written by Haofei Xu, Jing Zhang, Jianfei Cai, Hamid Rezatofighi, Fisher Yu, Dacheng Tao and Andreas Geiger, published in July 2023. Annotated data, for example obtained from a LiDAR®, are used for example.

[0120] According to a second particular embodiment, the learning step 37 of the local depth prediction model is carried out in a self-supervised manner and further comprises the following steps: • generation of a third image from the first image and depths predicted by a local depth prediction model for pixels of the first image, and of a fourth image from the second image and predicted depths, and • minimization of an error determined by comparing the third image and the second image, and by comparing the fourth image and the first image.

[0121] According to this second particular embodiment, the training of the local depth prediction model, as well as previously the training of the global depth prediction model, is done by self-supervision by changing the loss function. Self-supervision is based on image reconstruction. Image reconstruction is performed using the equation below:

[0122]

[0123] [Math.2] P2 = 7t(K'[T^P^\ D^p^ ] ) and p=7r(K[r^(p^-\ D(p2) ) ] ) With : • P] the coordinates of a pixel in the first image, • P2 the coordinates of a pixel in the second image, • A function to convert from homogeneous coordinates to pixel coordinates removing one dimension from a vector, • K is a projection model associated with camera 11, • a reprojection model associated with camera 11, • K' a projection model associated with the second camera 12, • a reprojection model associated with the second camera 12, • T and F1 of matrices including extrinsic parameters, • 0 a projection function in the three-dimensional scene of a pixel P^ in function of its coordinates in the first image, and of the depth j clu' 'u' is associated, and • 0' a projection function in the three-dimensional scene of a pixel P2 in function of its coordinates in the second image, and of the depth J who is associated.

[0124]

[0125] Depending on the type of cameras, K and K' represent intrinsic matrices of the first and second cameras when these cameras have pinhole lenses. Generating an image from a resized image acquired by a vision system camera involves reprojecting a pixel from the resized image onto the three-dimensional scene as a point. This point is then projected onto the image plane of another vision system camera, resulting in an image corresponding to a view of the three-dimensional scene from the other camera's perspective. A camera's image plane is a plane defined in the camera's frame of reference, normal to the camera's optical axis, and located at the camera's first focal length. Thus, the third image generated from the primary image is comparable to the secondary image. Similarly, the fourth image generated from the secondary image is comparable to the primary image. Because objects can obscure other objects in the scene, the generated images are not identical to the acquired images.Furthermore, depth prediction, like the models used to generate the images, is not error-free. Therefore, comparing a generated image to an acquired and resized image allows for an evaluation of the accuracy of the different models used.

[0126] The error is for example determined from a first error associated with each first pixel by comparing pixels of the first training image and the fourth generated image and a second error associated with each second pixel by comparing pixels of the second training image and the third image.

[0127] According to a first particular embodiment, the first and second errors are photometric errors as presented in the document "Digging Into Self-Supervised Monocular Depth Estimation" by Clément Godard, Oisin Mac Aodha, Michael Firman and Gabriel Brostow published in August 2019 and are determined by the following function: [Math.3] L.{P) = EJ ( l-«) • 1 / (P)-Up} ï{p) ) ) ]

[0128] With: • L'(p) the first reconstruction error denoted L'(p), respectively the second reconstruction error denoted L'(p), P being a pixel defined by its coordinates in an image, • l(p) a value of pixel P in the first image, respectively second image, * l[p] a value of pixel P in the fourth image, respectively third image, • SSIM a function that takes into account a local structure, and • has a weighting factor depending in particular on the type of road environment in which the vehicle travels 10.

[0129] According to a second particular embodiment, the first and second errors include a determination of a reconstruction error of a generated image determined, furthermore, by the following function:

[0130] [Math.4] P t ), W,o) =

[0131] With : • ^smooth(^( Pt )^ • °) a first error for a pixel Pt of the third image, respectively a second error for a pixel Pt of the fourth image, • D (pt ) is a depth associated with a pixel Pt, • VF is a parameter matrix, • 0 is the order of a smoothing gradient, • an L1 norm of the second-order depth gradients is calculated with W = 1, et0 =2, • x and are the dimensions of the third image, respectively fourth image, • P is a hyperparameter dependent on the road environment in which vehicle 10 is traveling, and • is a value of the pixel Pt in the third image, respectively fourth image.

[0132] This second function is generally used to deal with discontinuity at the boundary of objects.

[0133] The error is thus defined, for example, from the photometric errors and reconstruction errors previously defined.

[0134] According to a particular embodiment, the error is determined by the following function: [Math.5]

[0135] With: • The error, • (p} the first reconstruction error for a pixel P of the first image, and • -^(P) the second reconstruction error for a pixelp of the second image corresponding to pixel p of the first image.

[0136] Learning the local depth prediction model then consists of minimizing this error and adjusting the input parameters of the convolutional neural network.

[0137] Thus, the local depth prediction model used for predicting the depth of a pixel in a bounding box defined around pixels corresponding to an object detected in an image acquired by the first camera 11 is made more reliable by this learning process. Furthermore, the data used for this learning are obtained from the stereoscopic vision system itself; they therefore correspond to data that are perfectly representative of the use of the vision system mounted on the vehicle 10.

[0138] Figure 6 schematically illustrates a device 6 configured for determining the distance between a common object and a vehicle (10) equipped with a vision system and / or for learning a local depth prediction model associated with a vision system mounted in a vehicle 10, according to a particular and non-limiting embodiment of the present invention. The device 6 corresponds, for example, to a device mounted in the first vehicle 10, for example, a computer associated with the stereoscopic vision system.

[0139] Device 6 is, for example, configured to carry out the operations described opposite Figures 1 and 4 and / or steps described opposite Figures 2 and 3. Examples of such a device 6 include, but are not limited to, a Embedded electronic equipment such as a vehicle's on-board computer, an electronic control unit such as an ECU (Electronic Control Unit), a smartphone, a tablet, or a laptop computer. The elements of device 6, individually or in combination, can be integrated into a single integrated circuit, into several integrated circuits, and / or into discrete components. Device 6 can be implemented as electronic circuits, software (or computer) modules, or a combination of electronic circuits and software modules.

[0140] The device 6 comprises one (or more) processor(s) 60 configured to execute instructions for carrying out the steps of the process and / or for executing instructions from the software embedded in the device 6. The processor 60 may include integrated memory, an input / output interface, and various circuits known to those skilled in the art. The device 6 further comprises at least one memory 61, corresponding, for example, to volatile and / or non-volatile memory, and / or includes a memory storage device that may include volatile and / or non-volatile memory, such as EEPROM, ROM, PROM, RAM, DRAM, SRAM, flash, magnetic disk, or optical disk.

[0141] The computer code of the embedded software(s) including the instructions to be loaded and executed by the processor is for example stored on memory 61.

[0142] According to various particular and non-limiting embodiments, the device 6 is coupled in communication with other similar devices or systems (for example other computers) and / or with communication devices, for example a TCU (Telematic Control Unit), for example via a communication bus or through dedicated input / output ports.

[0143] According to a particular and non-limiting embodiment, the device 6 includes a block 62 of interface elements for communicating with external devices. The interface elements of the block 62 include one or more of the following interfaces: - radio frequency RF interface, for example of the Wi-Fi® type (according to IEEE 802.11), for example in the 2.4 or 5 GHz frequency bands, or of the Bluetooth® type (according to IEEE 802.15.1), in the 2.4 GHz frequency band, or of the Sigfox type using UBN (Ultra Narrow Band) radio technology, or LoRa in the 868 MHz frequency band, LTE (Long-Term Evolution), LTE-Advanced; - USB interface (from the English "Universal Serial Bus" or "Universal Serial Bus" in French); HD MI interface (from the English "High Definition Multimedia Interface", or "High Definition Multimedia Interface" in French); - LIN interface (from the English "Local Interconnect Network", or in French "Réseau interconnecté local").

[0144] According to another particular and non-limiting embodiment, the device 6 includes a communication interface 63 which enables communication with other devices (such as other computers in the embedded system) via a communication channel 630. The communication interface 63 corresponds, for example, to a transmitter configured to transmit and receive information and / or data via the communication channel 630. The communication interface 63 corresponds, for example, to a wired network of the CAN (Controller Area Network), CAN FD (Controller Area Network Flexible Data-Rate), FlexRay (standardized by ISO 17458) or Ethernet (standardized by ISO / IEC 802-3) type.

[0145] According to a particular and non-limiting embodiment, the device 6 can provide output signals to one or more external devices, such as a display screen 640, touch or non-touch, one or more speakers 650 and / or other peripherals 660 via the output interfaces 64, 65, 66 respectively. According to a variant, one or more of the external devices is integrated into the device 6.

[0146] Of course, the present invention is not limited to the embodiments described above but extends to a method for measuring the distance between an object and a vehicle equipped with a vision system, which would include secondary steps without falling outside the scope of the present invention. The same would apply to a device configured for implementing such a method.

[0147] The present invention also relates to a vehicle, for example an automobile or more generally an autonomous land-powered vehicle, comprising the device 6 of [Fig.6].

Claims

1. Demands Method for determining the distance separating a current object from a vehicle (10) carrying a vision system comprising a first and a second camera arranged so as to each acquire an image of a current three-dimensional scene including said current object, said distance being determined from depths predicted by a local depth prediction model selected from a plurality of local depth prediction models, said depths being predicted for pixels of a bounding box associated with a set of pixels corresponding to said current object in a current image acquired by said first camera (11), said method being implemented by at least one processor, and being characterized in that the local depth prediction model is learned in a learning phase comprising the following steps: - reception (31) of pairs of training images, each pair of training images comprising a first image (41) acquired by the first camera (11) and a second image acquired by the second camera (12); - for each pair of training images, identification (32) of pixels corresponding to a training object (O) in each image of a pair of images and determination for said training object of a bounding box (B) in the first image (41); - for each learning object, determination (33) of a distance associated with said learning object from depths predicted for pixels included in said bounding box (B), called first pixels, from the first pixels and pixels of the second image, called second pixels, corresponding to said first pixels, the depths being predicted by a global depth prediction model associated with the vision system; - determination (34) of a window dimension from bounding box dimensions determined for a set of learning objects including each learning object for which said associated distance is greater than a threshold distance; - generation (35) of a set of windows covering the entirety of each first image (41), each window of said set of windows having said window dimension, and each local depth prediction model of the plurality of local depth prediction models being associated with a different window of said plurality of windows; - for each training object of said set of training objects: • selection (36) of a window (F) from said set of windows, the center (CF) of said window (F) being the closest to the center (CB) of the first bounding box (B) associated with said each training object from among the centers of the windows of said set of windows; • training (37) of the local depth prediction model associated with said window (F) selected from said first and second pixels.

2. A method according to claim 1, wherein the centers of the windows of said window set are distributed according to a grid (G) defined in each first image (41) along a horizontal direction and a vertical direction, a horizontal distance between two consecutive window centers along the horizontal direction being equal to half the width of a window and a vertical distance between two consecutive window centers along the vertical direction being equal to half the height of a window.

3. A method according to claim 1 or 2, wherein the learning step (37) of the local depth prediction model is carried out in a supervised manner.

4. A method according to claim 1 or 2, wherein the training step (37) of the local depth prediction model is carried out in a self-supervised manner and further comprises the following steps: • generation of a third image from the first image and depths predicted by a local depth prediction model for pixels of the first image and of a fourth image from the second image and predicted depths, and • minimization of an error determined by comparison of said third image and the second image and by comparison of the fourth image and the first image.

5. A method according to any one of claims 1 to 4, wherein said determination of the distance separating said current object from the vehicle (10) further comprises the following steps: - receiving (21) the first current image and a second current image acquired by the second camera (12); - identifying (22) pixels corresponding to said current object in the first current image and determining a current bounding box comprising said pixels; - predicting (23) depths associated with pixels of said current bounding box by a local depth prediction model, said local depth prediction model being selected from the plurality of local depth prediction models as a function of the position of a center of said current bounding box;and - determination (24) of said distance separating the current object from the vehicle (10) from the depths associated with said pixels of the current bounding box.;

6. A method according to claim 5, wherein the distance separating the current object from the vehicle (10) is equal to an average of the depths associated with the pixels of the current bounding box.

7. A method according to any one of claims 1 to 6, further comprising, for a pair of training images, a step of determining a set of target pixels in the second image (42) of said pair of training images, each target pixel (421) being an image of a reference pixel (411) of the first image (41) of said pair of training images, coordinates of which in the second image (42) are determined by a transformation function applied to the reference pixel (411) for different depth values, the different depth values ​​each being greater than said threshold depth, said window dimension being determined (34) from the dimensions of a bounding box (B42i) said set of target pixels.

8. A method according to any one of claims 1 to 7, wherein, when at least two bounding boxes associated with at least two training objects include pixels in common, then said at least two training objects are not included in said set of training objects.

9. 28 Device (6) for determining a distance separating a common object from a vehicle (10) carrying a vision system, said device (6) comprising a memory (61) associated with at least one processor (60) configured for carrying out the steps of the method according to any one of claims 1 to 8.

10. Vehicle (10) comprising the device (6) according to claim 9.