Method and device for learning a depth prediction model associated with a vision system generating images that can be distorted
A neural network-based depth prediction model optimizes the learning process by resizing images and minimizing errors to enhance the efficiency and reliability of ADAS systems, addressing the challenges of training data requirements and improving road safety.
Patent Information
- Application Number
- FR2024005464
- Authority / Receiving Office
- FR · FR
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-05-28
- Publication Date
- 2025-12-05
- Estimated Expiration
- 2044-05-28
AI Technical Summary
Learning a depth prediction model for Advanced Driver-Assistance Systems (ADAS) using vehicle-mounted cameras is tedious and requires significant time and high-quality training data, necessitating an optimization of the training phase to improve efficiency and reliability.
A method for determining depth using a convolutional neural network-based depth prediction model that learns by resizing images to process only pixels within a common field of view of multiple cameras, applying transformation functions to find corresponding pixels, and minimizing errors through a loss function, utilizing intrinsic and extrinsic parameters and projection models.
The method enhances the accuracy and efficiency of depth prediction, allowing ADAS systems to reliably determine distances to objects, thereby improving road safety by enabling precise vehicle control and collision avoidance.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
Title of the invention: Method and device for learning a depth prediction model associated with a vision system generating images that can be distorted. Technical field
[0001] The present invention relates to methods and devices for determining depth using a vision system mounted in a vehicle, for example, in a motor vehicle. The present invention also relates to a method and device for measuring the distance between an object and a vehicle equipped with a vision system. Technological background
[0002] Many modern vehicles are equipped with Advanced Driver-Assistance Systems (ADAS). Such ADAS systems are passive and active safety systems designed to eliminate human error in driving all types of vehicles. ADAS systems use advanced technologies to assist the driver while driving and thus improve performance. ADAS systems 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.
[0003] 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.
[0004] The AD AS systems embedded in a vehicle are powered by data obtained one or more onboard sensors, such as cameras. These cameras make it possible to detect and locate other road users or potential obstacles around a vehicle in order to, for example: • to adapt the vehicle's lighting according to the presence of other road users; • to automatically regulate the vehicle's speed; • to act on the braking system in case of risk of impact with an object.
[0005] Learning a depth prediction model associated with these cameras is tedious and requires both a large amount of high-quality training data and time. In order to learn the depth prediction model from data acquired by the vision system itself, the training phase should be optimized to reduce its duration while improving its reliability. Summary of the present invention
[0006] One object of the present invention is to solve at least one of the problems of the technological background described above.
[0007] 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.
[0008] Another object of the present invention is to improve road safety, in particular by improving the reliability of AD AS systems powered by data obtained from a vision system.
[0009] According to a first aspect, the present invention relates to a method for determining the depth of a pixel of an image by a depth prediction model implemented by a convolutional neural network associated with a vision system embedded in a vehicle, the vision system comprising a first and a second camera so as to each acquire an image of a three-dimensional scene from a different viewpoint, the method being implemented by at least one processor, and being characterized in that the depth prediction model is learned in a learning phase comprising the following steps: - reception of representative data of a first image and a second image acquired by respectively the first camera and the second camera at the same time instant of acquisition; - determining an image set of pixels in the second image by applying a transformation function to a source pixel of the first image for a set of depths associated with the source pixel, the depths of the depth set being between a minimum depth and a maximum depth, - determining the width and height of a pixel search window as a function of the coordinates in the second image of the pixels in the pixel image set and the coordinates in the first image of the source pixel; - determination, for each first pixel of a set of pixels of the first image, of a first target set of pixels in the second image as a function of the coordinates of the first pixel and the pixel search window, and determination, for each second pixel of a set of pixels of the second image, of a second target set of pixels in the first image as a function of the coordinates of the second pixel and the pixel search window; - Determining an abscissa in the first image of a first target pixel by applying an inverse function of the transformation function to a first reference pixel belonging to a lateral edge of the second image as a function of a determined depth, and an ordinate in the second image of a second target pixel by applying the transformation function to a second reference pixel belonging to a horizontal edge of the first image as a function of the determined depth; - generation of a first image resized by cropping the first image and a second image resized by cropping the second image according to the x-coordinate of the first target pixel and the y-coordinate of the second target pixel, the first resized image and the second resized image being of the same definition; - prediction of a depth associated with each first pixel by the depth prediction model from the first resized image and the first target set and prediction of a depth associated with each second pixel by the depth prediction model from the second resized image and the second target set; - generation of a third image from the first resized image by applying the transformation function to the first pixels based on the depths associated with the first pixels and generation of a fourth image from the second image resized by applying the inverse transformation function to the second pixels according to the depths associated with the second pixels; - determination of a first error associated with each first pixel by comparing pixels from the first resized image and the fourth image, and of a second error associated with each second pixel by comparing pixels from the second resized image and the third image; - learning the depth prediction model by minimizing a loss error determined from the first and second errors.
[0010] Such a learning process gains efficiency through image resizing to process only pixels located within a field of view common to both cameras and by searching for corresponding pixels in target sets of pixels of limited size. The depth prediction model thus learned makes it possible to accurately predict the depth of a pixel in an image acquired by one of the cameras of the stereoscopic vision system, that is, the distance separating the vehicle carrying the camera from a physical object in the three-dimensional scene associated with that pixel.
[0011] According to a variant of the method, the transformation function determines, for an input pixel: • spatial coordinates of an intermediate point using a reprojection model based on the coordinates of the input pixel in the first image and a depth associated with the input pixel, and • the coordinates of an output pixel in the second image by a projection model as a function of the spatial coordinates of the intermediate point; the projection and reprojection models are implemented by a neural network learned during a calibration phase of the vision system.
[0012] According to another variant of the process, the transformation function is defined by: With : • Ps the coordinates of a pixel in the second image, •77 a function to convert from homogeneous coordinates to pixel coordinates by removing one dimension from a vector, • K is a camera-associated direction prediction model, • K' is a direction prediction model associated with the second, • Let T be a matrix comprising extrinsic parameters, and • 0 a projection function in the three-dimensional scene of a pixel Pt as a function of its coordinates in the first image, and of the depth j associated with it.
[0013] According to yet another variant of the process, the inverse transformation function is defined by: P, =-44^( / ^.-0( / -,))]) With : • Ps the coordinates of a pixel in the first image, •71 a function to convert from homogeneous coordinates to pixel coordinates by removing one dimension from a vector, • K is a camera-associated direction prediction model, • K' is a direction prediction model associated with the second, • Let T be a matrix comprising extrinsic parameters, and • 0 a projection function in the three-dimensional scene of a pixel Pt in function of its coordinates in the second image, and of the depth who is associated.
[0014] According to yet another variant of the learning process, the determined depth corresponds to an average depth of a depth prediction range.
[0015] According to yet another variant of the learning process, the first and second errors are photometric errors determined by the following function: L*(P) = E4 (!-«)• \Hp)-HP) 1 +« ' ( ï(p) ) ) ] With : • L*(p) the first reconstruction error denoted L\ (p), respectively the second reconstruction error denoted L2( p) , p being a pixel defined by its coordinates in an image, • l(p) a value of the pixelp in the first resized image, respectively second resized image, * l[p] is a value of pixel p in the fourth image, or third image respectively, • SSIM is a function that takes into account a local structure, and • has a weighting factor depending in particular on the type of environment.
[0016] According to yet another variant of the learning process, the loss error is determined by the following function: L,^p^in(Li(p),L2(p)) With : • The loss error, • L^p) the first reconstruction error for a pixel p of the first resized image, and • L2(p) the second reconstruction error for a pixelp of the second resized image corresponding to the pixelp of the first resized image.
[0017] According to a second aspect, the present invention relates to a device for learning a depth prediction model associated with a vision system embedded in a vehicle, the device comprising a memory associated with at least one processor configured for the implementation of the steps of the process according to the first aspect of the present invention.
[0018] 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.
[0019] 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.
[0020] Such a computer program can use any programming language and be in the form of source code, object code, or a intermediate code between source code and object code, such as in a partially compiled form, or in any other desirable form.
[0021] 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.
[0022] 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.
[0023] 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.
[0024] 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
[0025] 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 7, in which:
[0026] [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;
[0027] [Fig.2] illustrates a flowchart of the different steps of a process for determining the depth of a pixel of an image by a depth prediction model associated with a vision system embedded in the vehicle of [Fig.1], according to a particular and non-limiting embodiment of the present invention;
[0028] [Fig.3] illustrates a flowchart of the different stages of a method for learning the depth prediction model used in the method of [Fig.2], according to a particular and non-limiting example of the present invention;
[0029] [Fig.4] schematically illustrates images received and / or generated during the learning process of [Fig.3], according to a particular and non-limiting example of the present invention;
[0030] [Fig. 5] schematically illustrates a device configured to determine the depth of a pixel in an image acquired by a vision system embedded in the vehicle of the [Fig.1], according to a particular and non-limiting example of the present invention;
[0031] [Fig. 6] schematically illustrates a pixel search window in an image acquired by the vision system embedded in the vehicle of [Fig. 1], according to a particular and non-limiting embodiment of the present invention; and
[0032] [Fig.7] schematically illustrates areas for searching for corresponding pixels in images acquired by the vision system on board the vehicle of [Fig.1], according to a particular and non-limiting embodiment of the present invention. Description of examples of achievements
[0033] A method and device for determining the depth of a pixel of an image by a neural network associated with a vision system embedded in a vehicle will now be described in what follows with joint reference to Figures 1 to 7. The same elements are identified with the same reference signs throughout the description that follows.
[0034] 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.
[0035] According to a particular and non-limiting example of an embodiment of the present invention, a method for determining the depth of a pixel of an image by a depth prediction model implemented by a convolutional neural network associated with a vision system comprising several cameras.
[0036] Indeed, the depth prediction model is learned in a learning phase comprising resizing images acquired by the vision system in order to process only parts of images corresponding to parts of the three-dimensional scene observed by two cameras of the vision system and searching for corresponding pixels between the images by limiting the search area to sets of target pixels of limited size.
[0037] Depths associated with the pixels of the resized images are then predicted and images are generated from the images acquired by the vision system and from the predicted depths, thus allowing a first and second error to be determined by comparing pixels of the resized images and the generated images.
[0038] The depth prediction model is learned by minimizing a loss error determined from the first and second errors.
[0039] Fig. 1 schematically illustrates a vision system equipping a vehicle, according to a particular and non-limiting embodiment of the present invention.
[0040] Such an environment 1 corresponds, for example, to a road environment consisting of a network of roads accessible to the vehicle 10.
[0041] 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.
[0042] 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.
[0043] 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.
[0044] The intrinsic parameters of the second camera 12 characterize, for their part, the transformation which associates, for an image point, its three-dimensional coordinates in the reference frame 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.
[0045] 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 model of camera by introducing the three distortions that generate the most effects, namely radial, decentering and prismatic distortions, induced by defects in curvature, parallelism of lenses and coaxiality of optical axes.
[0046] 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.
[0047] 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.
[0048] 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.
[0049] 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.
[0050] An extrinsic matrix of the vision system then includes the extrinsic parameters previously defined.
[0051] Note that the first and second cameras 11,12 are arranged so that the optical axis Cl of the first camera 11 is in a first plane parallel to a second plane comprising the optical axis C2, these two planes being separated by a distance H along the vertical direction z. Thus, the angle 0 of rotation is defined between the two optical axes and includes only the 0z component.
[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 depth using a vision system embedded in the vehicle 10 is advantageously implemented by the vehicle 10, i.e., by a processor, a computer, or a combination of computers of the system embedded in vehicle 10, for example by the computer(s) in charge of the vision system of vehicle 10.
[0070] Figure 2 illustrates a flowchart of the different steps of a process 2 of Determining the depth of a pixel in an image using a depth prediction model implemented by a convolutional neural network associated with a vision system embedded in a vehicle, for example in vehicle 10 of [Fig. 1], according to a particular and non-limiting embodiment of the present invention. Method 2 is implemented, for example, by a device of the vision system embedded in vehicle 10 or by device 5 of [Fig. 5].
[0071] In a step 21, representative data of an image acquired by the first camera 11 and of an image acquired by the second camera 12 are received.
[0072] In a step 22, depths associated with a set of pixels of one of the received images are predicted by the depth prediction model from the two received images.
[0073] Each determined depth then corresponds to a distance separating the vehicle 10 or a part of the vehicle 10 from an object in the three-dimensional scene to which a pixel is associated, the determination of a depth of a pixel then corresponding to a measurement of a distance separating an object from the vehicle carrying the vision system.
[0074] 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. For example, if the ADAS's function is 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 same 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.
[0075] Figure 3 illustrates a flowchart of the different stages of a method for learning the depth prediction model used in a method for determining the depth of a pixel of an image, for example in method 2 of Figure 2, according to a particular and non-limiting embodiment of the present invention.
[0076] The learning process 3 is for example implemented by the device on board the vehicle 10 implementing the process of determining a depth by vision system on board a vehicle or by the device 5 of the [Fig.5].
[0077] In a step 31, representative data of a first image 41 and a second image 42 are received, the first image 41 being acquired by the first camera 11 at an acquisition time instant and the second image 42 being acquired by the second camera 12 at the same acquisition time instant.
[0078] According to a particular embodiment, the first image and second 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.
[0079] According to another particular embodiment, the first and second images are not of the same resolution. An additional step then consists of resizing or cropping them to obtain a first and second image of the same resolution.
[0080] In a step 32, as illustrated in [Fig. 6], an image set of pixels I in the second image 42 is determined by applying a transformation function to a source pixel 41 of the first image 41 for a set of depths associated with the source pixel 410r, the depths of the depth set being between a minimum depth and a maximum depth. Thus, for each depth in the depth set, a pixel of the image set of pixels is determined.
[0081] The objective of this step 32 is to determine which candidate pixels in the second image 42 correspond to pixel 41 of the first image 41 based on possible depths, i.e., depths between a minimum and a maximum depth. The candidate pixels then form a set of candidate pixels I in the second image 42. The minimum and maximum depths are, for example, equal to the limits of the measurement range of the vision system; for example, the minimum depth is equal to two meters (2m), while the maximum depth is equal to one hundred meters (100m).Note that the minimum depth is of great importance; indeed, a given disparity or optical flux for a pixel is maximal when the predicted depth for that pixel is minimal. A minimum depth of 0 would therefore result in target sets of pixels of infinite size and would be pointless because it would not reduce the search time for a pixel matching that pixel. The depths of the depth set are defined, for example, with regular intervals, such as intervals of one-tenth of a meter (0.1m).
[0082] According to a particular embodiment, the transformation function determines, for an input pixel: • spatial coordinates of an intermediate point in the three-dimensional scene using a reprojection model based on the coordinates of the input pixel in the first image 41 and a depth associated with the input pixel, the input pixel here being the source pixel 410r and the depth a depth of the set of depths, and • coordinates of an output pixel in the second image 42 by a projection model as a function of the spatial coordinates of the intermediate point.
[0083] Projection and reprojection models are notably implemented by a A neural network learned during a calibration phase, also called calibration, of the vision system. A calibration method is known to those skilled in the art, and is presented, for example, in the document "Single View Point Omnidirectional Camera Calibration from Planar Grids", written by Christopher Mei and Patrick Rives, published in April 2007. Thus, the intrinsic parameters of the first and second cameras 11, 12 are determined and can be used to determine the coordinates of a pixel in an image acquired by the first camera 11 and / or the second camera 12 from the relative position of a point in the three-dimensional scene with respect to the observation position of the first camera 11 and / or the second camera 12, the pixel being associated with this point.
[0084] According to another particular embodiment, the transformation function is defined by: [Math.l] P^ D(.Pt))]}
[0085] With : • Ps the coordinates of a pixel in the second image 42, • 77 a function to convert from homogeneous coordinates to pixel coordinates by removing one dimension from a vector, • K is a direction prediction model associated with camera 11, • K' a direction prediction model associated with the second 12, • Let T be a matrix comprising extrinsic parameters, and • 0 a projection function in the three-dimensional scene of a pixel Pt as a function of its coordinates in the first image 41, and of the depth j associated with it.
[0086] The direction prediction models associated with the first and second cameras 11,12 are also known to those skilled in the art, such a prediction model being notably presented in the document "Neural Ray Surfaces for Self-Supervised Learning of Depth and Ego-motion" written by Igor Vasiljevic, Vitor Guizilini, Rares Ambrus, Sudeep Pillai, Wolfram Burgard, Greg Shakhnarovich and Adrien Gaidon published in August 2020.
[0087] In a step 33 and as illustrated in [Fig.6], a width LF and a height HF of a pixel search window F are determined as a function of the coordinates in the second image 42 of the pixels of the pixel image set I and the coordinates in the first image 41 of the source pixel 41 Or.
[0088] According to a particular embodiment, the first camera 11 is positioned to the left and below the second camera 12. The pixel 410r of the first image 41 is then located at the bottom right of the first image 41, with coordinates (L4[ ;H4[) if the origin of the images is their top left corner.
[0089] According to another example, if the second camera 12 is located below and to the right of the first camera 11, then the pixel 41 of the first image 41 is the one located at the top right of the first image 41, with coordinates (L4i ;0) if the origin of the images is their top left corner.
[0090] The width LF of the pixel search window F is, for example, equal to the maximum absolute value of the difference between an abscissa in the second image 42 of a pixel in the pixel set I and the abscissa in the first image 41 of pixel 410r. Similarly, the height HF of the pixel search window F is, according to this same example, equal to the difference between an ordinate in the second image 42 of a pixel in the pixel set I and the ordinate in the first image 41 of pixel 410r.
[0091] This yields:
[0092] [Math 2] • LF = max(lx1-x410rl), and • Hf = max(lyry4i0rl),
[0093] With: • LF the width of the pixel search window F, • Hf is the height of the pixel search window F, • X! the abscissa of a pixel of the set of candidate pixels I, • y! the ordinate of a pixel from the set of candidate pixels I, • x4i0r the abscissa in the first image 41 of pixel 410r, and • y4ior the ordinate in the first image 41 of pixel 410r.
[0094] In a step 34 and as illustrated in [Fig.7], a first target set of pixels 422 in the second image 42 is determined for each first pixel 412 of a set of pixels of the first image 41 as a function of coordinates of the first pixel 412 and of the search window.
[0095] Similarly, a second target set of pixels 413 in the first image 41 is determined for each second pixel 423 of a set of pixels in the second image 42 as a function of the coordinates of the second pixel 423 and the search window.
[0096]
[0097] Each first target set of pixels 422 then corresponds to a rectangular area whose dimensions are equal to those of the pixel search window F previously defined and whose position in the second image 42 is defined by the coordinates in the first image 41 of a first pixel 412. Similarly, each second target set of pixels 413 then corresponds to a rectangular area whose dimensions are equal to those of the previously defined pixel search window F and whose position in the first image 41 is defined by the coordinates in the second image 42 of a second pixel 423.
[0098]
[0099]
[0100]
[0101]
[0102] These target sets allow for faster searching for pixels corresponding to a first or second pixel by restricting the search area, i.e. by restricting the number of pixels that can correspond to the first or second pixel 412, 423. The search for a corresponding pixel in each of the first and second images 41, 42 is thus faster. In a step 35, an abscissa in the first image 41 of a first target pixel 410a is determined by applying an inverse function of the transformation function to a first reference pixel 420a belonging to a lateral edge 421v of the second image 42 as a function of a determined depth Similarly, an ordinate in the second image 42 of a second target pixel 420b is determined by applying the transformation function to a second reference pixel 410b belonging to a horizontal edge 41 Ih of the first image 41 as a function of the determined depth. The inverse transformation function is, for example, defined by: [Math.3] p^K^'^p^', / >( / >,))]) With : • Ps the coordinates of a pixel in the first image 41, • A function to convert from homogeneous coordinates to pixel coordinates removing one dimension from a vector, • K is a direction prediction model associated with camera 11, • K' a direction prediction model associated with the second 12, • T' is a matrix comprising extrinsic parameters, and • 0 a projection function in the three-dimensional scene of a pixel Pt in function of its coordinates in the second image 42, and of the depth ) Who associated with it is, here, the determined depth.
[0103] The particular embodiment illustrated in [Fig. 4] corresponds to a specific relative position of the first and second cameras 11, 12, the first camera 11 being positioned to the left and below the second camera 12. The lateral edge 421v of the second image 42 then corresponds to the left edge of the second image 42 and the horizontal edge 41Ih of the first image 41 then corresponds to the upper edge, or top edge, of the first image 4L
[0104] According to another particular embodiment, when the first camera 11 is to the left above the second camera 12, the lateral edge 421v of the second image 42 corresponds to the left edge of the second image and the horizontal edge 41 Ih of the first image 41 corresponds to the lower edge of the first image.
[0105] According to a particular embodiment, the determined depth corresponds to an average depth within a depth prediction range. For example, if the depth of the observed three-dimensional scene objects is between 2 and 100 m, then the determined depth has a value of 51 m.
[0106] According to other particular embodiments, the determined depth corresponds to a median value of predicted depths for different three-dimensional scenes observed or to an average value of predicted depths for the reference pixel during subsequent observations.
[0107] In a step 36 and as illustrated in [Fig.4], a first resized image 41' is generated by cropping the first image 41 and a second resized image 42' is generated by cropping the second image 42, the cropping being a function of the abscissa of the first target pixel 410a and the ordinate of the second target pixel 420b, the first resized image 41' and the second resized image 42' being of the same definition.
[0108] The first and second resized images 41', 42' thus have a width determined from the abscissa x4i0a of the first target pixel 410a. Therefore, the width L4n of the first resized image 41' is equal to the width L42i of the second resized image 42' and is equal to the difference between the width L4i of the first image 41, the latter being equal to the width L42 of the second image 42, and the abscissa x4i0a of the first target pixel 410a. We thus obtain: L4i = L42 and L4n = L421 = L4rx4i0a.
[0109] Similarly, the first and second resized images 41', 42' have a height determined from the y420b coordinate of the second target pixel 420b. Thus, the height H4n of the first resized image 41' is equal to the height H42 of the second resized image 42' and is equal to the difference between the height H4 of the first image 41 (the latter being equal to the height H42 of the second image 42) and the y420b coordinate of the second target pixel 420b. We thus obtain: H4i = H42 and H421 = H411 = H42-y420b-
[0110] The first resized image 41' is generated from the first image 41, with pixels of the first resized image 41' corresponding to pixels of the first image 41, of which: • an abscissa is located between the abscissa x4i0a of the first target pixel 410a and an abscissa of the right edge 41 Iv of the first image 41, and • an ordinate is between the ordinate y411 equal to the height H4n and an ordinate of the upper edge 41 Ih of the first image 41.
[0111] The pixels of the first image 41 retained to generate the first resized image 41' then correspond to objects of the three-dimensional scene observable by both the first camera 11 and the second camera 12, that is to say, objects of the three-dimensional scene located in the common field of view of the first and second cameras 11, 12, the third acquisition field 15. Indeed, some areas of the first image 41 include pixels corresponding to objects located outside the field of view of the second camera 12 and therefore do not have a corresponding pixel in the second image 42. Thus, the first resized image 41' includes only pixels each having a corresponding pixel in the second image 42 in the absence of occlusion.
[0112] Similarly, the second resized image 42' is generated from the second image 42, with pixels in the second resized image 42' corresponding to pixels in the second image 42, of which: • an abscissa is located between an abscissa x42i equal to the width L42i and the abscissa of the left edge 421v of the second image 42, and • an ordinate is between the ordinate y420b of the second target pixel 420b and the ordinate of the lower edge 42Ih of the second image 42.
[0113] The pixels of the second image 42 retained to generate the second resized image 42' then correspond to objects of the three-dimensional scene observable by both the first camera 11 and the second camera 12, that is to say objects of the three-dimensional scene located in the common field of view of the first and second cameras 11, 12, the third acquisition field 15. Indeed, some areas of the second image 42 include pixels corresponding to objects located outside the field of view of the first camera 11 and therefore do not have a corresponding pixel in the first image 4L. Thus, the second resized image 42' includes only pixels each having a corresponding pixel in the first image 41 in the absence of occlusion.
[0114] The use of a specific depth and cropping the first and second images 41, 42 horizontally and vertically is not intended to remove Each pixel in one image has no corresponding pixel in the other image, but a large proportion of pixels corresponding to objects in the three-dimensional scene observed by both cameras (11, 12) are retained. For example, pixels in one image with a corresponding pixel in the other image represent more than 90 or 95% of the pixels in a resized image. Any error induced by the presence of pixels in one image without a corresponding pixel in the other image is then rendered negligible in subsequent steps.
[0115] In a step 37, a depth associated with each first pixel 412 is predicted by the depth prediction model from the first resized image 41' and the first target set 422 and a depth associated with each second pixel 423 is predicted by the depth prediction model from the second resized image 42' and the second target set 413.
[0116] Such a depth prediction model implemented by a convolutional neural network is known to those skilled in the art and is presented for example in the paper "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.
[0117] Thus, depths are predicted for each pixel of a resized image 41', 42', the definition of a depth map is then equal to the definition of each resized image and avoids any approximation or interpolation to determine depths associated with each pixel of a resized image 41', 42', thus saving computation time.
[0118] The depth associated with each first or second pixel is determined by comparing the positions of the pixels in the first and second resized images 41', 42'.
[0119] In a step 38, a third image 43 is generated from the first resized image 41' by applying the transformation function to the first pixels 412 according to the depths associated with the first pixels 412 and a fourth image 44 is generated from the second resized image 42' by applying the inverse transformation function to the second pixels 423 according to the depths associated with the second pixels 423.
[0120] Generating an image from an image acquired by a camera of the vision system and resized consists of reprojecting a pixel of the resized image into the three-dimensional scene as a point, and then projecting this point into the image plane of another camera of the vision system, so as to obtain an image corresponding to a view of the three-dimensional scene from the viewpoint of the other camera. The image plane of a camera corresponds to 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 43 generated from the first resized image 41' is comparable to the second resized image 42'. Similarly, the fourth image 44 generated from the second resized image 42' is comparable to the first resized image 41'. Because objects can obscure other objects in the scene, the generated images are not identical to 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.
[0121] In a step 39, a first error associated with each first pixel 412 is determined by comparing pixels of the first resized image 41' and fourth image 44.
[0122] Similarly, a second error associated with each second pixel 423 is determined by comparing pixels of the second resized image 42' and third image 43.
[0123] 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.4] L^P) = ' 1^)\+a\\-^SIM(l(p\ ï{p) ) ) ]
[0124] With: • L*(p) the first reconstruction error denoted L}(p), respectively the second reconstruction error denoted ^(l7), p being a pixel defined by its coordinates in an image, • l(p) a value of the pixelp in the first resized image 41', respectively second resized image 42', * l(p) a value of pixel p in the fourth image 44, respectively third image 43, • SSIM is 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.
[0125] 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:
[0126] [Math.5] D (p,). W, o) = W(p,)\^D a (p t )
[0127] With: • ^smooth( ^( Pt\ ° ) a first error for a pixel p of the third image 43, respectively a second error for a pixel p of the fourth image 44 , • D(ptj 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 VF = 1, et0 = 2, • x and y are the dimensions of the third image, and the fourth image respectively. • P is a hyperparameter dependent on the road environment in which vehicle 10 is traveling, and • It( Pf) is a value of the pixel Pt in the third image 43, respectively fourth image 44.
[0128] This second function is generally used to deal with discontinuity at the boundary of objects.
[0129] The reconstruction error is thus defined, for example, from the photometric errors and reconstruction errors previously defined.
[0130] In a step 40, the depth prediction model is learned by minimizing a loss error determined from the first and second errors.
[0131] According to a particular embodiment, the loss error is determined by the following function: [Math.6] L'= p),L2(p))
[0132] With: • The loss error, • L^p} the first reconstruction error for a pixelp of the first resized image 41', and • L2{p) the second reconstruction error for a pixelp of the second resized image 42' corresponding to the pixel p of the first resized image 41'.
[0133] The training of the depth prediction model consists of adjusting the input parameters of the convolutional neural network in order to minimize the previously calculated loss error.
[0134] Thus, the depth prediction model used for the depth prediction of a pixel of an image acquired by the first camera 11 or by the second camera 12 is made more reliable thanks to this learning process. Moreover, the data enabling this learning is obtained from the stereoscopic vision system itself, and therefore corresponds to data that is perfectly representative of the use of the vision system onboard vehicle 10.
[0135] The steps of resizing the received images and determining the target sets of pixels make it possible in particular to optimize computation times, the learning process is thus faster to implement than other known learning processes, reducing in particular the time to search for corresponding pixels and not requiring depth interpolation steps, the depths being predicted for each pixel of each of the resized images.
[0136] Figure 5 schematically illustrates a device 5 configured for learning a depth prediction model associated with a vision system embedded in a vehicle 10 and / or for predicting a depth associated with a pixel of an image acquired by the vision system embedded in a vehicle 10, according to a particular and non-limiting embodiment of the present invention. The device 5 corresponds, for example, to a device embedded in the first vehicle 10, for example, a computer associated with the stereoscopic vision system.
[0137] The device 5 is, for example, configured to carry out the operations described opposite Figures 1 and 4 and / or the steps described opposite Figures 2 and 3. Examples of such a device 5 include, but are not limited to, 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 the device 5, individually or in combination, may be integrated into a single integrated circuit, into several integrated circuits, and / or into discrete components. The device 5 may be implemented in the form of electronic circuits or software (or computer) modules, or a combination of electronic circuits and software modules.
[0138] The device 5 comprises one (or more) processor(s) 50 configured to execute instructions for carrying out the steps of the process and / or for executing instructions from the software embedded in the device 5. The processor 50 may include integrated memory, an input / output interface, and various circuits known to those skilled in the art. The device 5 further comprises at least one memory 51, for example, 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.
[0139] 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 51.
[0140] According to various particular and non-limiting embodiments, the device 5 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.
[0141] According to a particular and non-limiting embodiment, the device 5 includes a block 52 of interface elements for communicating with external devices. The interface elements of the block 52 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").
[0142] According to another particular and non-limiting embodiment, the device 5 includes a communication interface 53 which enables communication with other devices (such as other computers in the embedded system) via a communication channel 530. The communication interface 53 corresponds, for example, to a transmitter configured to transmit and receive information and / or data via the communication channel 530. The communication interface 53 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.
[0143] According to a particular and non-limiting embodiment, the device 5 can provide output signals to one or more external devices, such as a display screen 540, touch or not, one or more speakers 550 and / or other peripherals 560 via output interfaces 54, 55, 56 respectively. In one variant, one or more of the external devices is integrated into device 5.
[0144] 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.
[0145] The present invention also relates to a vehicle, for example an automobile or more generally an autonomous land-powered vehicle, comprising the device 5 of [Fig.5].
Claims
1. Demands Method for determining the depth of a pixel of an image by a depth prediction model implemented by a convolutional neural network associated with a vision system embedded in a vehicle (10), the vision system comprising a first and a second camera so as to each acquire an image of a three-dimensional scene from a different point of view, said method being implemented by at least one processor, and being characterized in that the depth prediction model is learned in a learning phase comprising the following steps: - reception (31) of data representative of a first image (41) and a second image (42) acquired by respectively the first camera (11) and the second camera (12) at the same time instant of acquisition; - determination (32) of an image set of pixels (I) in the second image (42) by applying a transformation function to a source pixel (41 Or) of the first image (41) for a set of depths associated with the source pixel (410r), the depths of the set of depths being between a minimum depth and a maximum depth, - determination (33) of a width and a height of a pixel search window (F) as a function of the coordinates in the second image (42) of the pixels of the image set of pixels (I) and the coordinates in the first image (41) of the source pixel (41 Or);- determination (34), for each first pixel (412) of a set of pixels of the first image (41), of a first target set of pixels (422) in the second image (42) as a function of coordinates of the first pixel (412) and of the pixel search window (F), and determination, for each second pixel (423) of a set of pixels of the second image (42), of a second target set of pixels (413) in the first image (41) as a function of coordinates of the second pixel (423) and of the pixel search window (F); - determination (35) of an abscissa in the first image (41) of a first target pixel (410a) by applying an inverse function of the transformation function to a first reference pixel (420a) belonging to a lateral edge (42 Iv) of the second image
2. (42) as a function of a determined depth, and of an ordinate in the second image (42) of a second target pixel (420b) by application of the transformation function to a second reference pixel (410b) belonging to a horizontal edge (41 Ih) of the first image (41) as a function of the determined depth; - generation (36) of a first resized image (41') by cropping the first image (41) and of a second resized image (42') by cropping the second image (42) as a function of the abscissa of the first target pixel (410a) and the ordinate of the second target pixel (420b), the first resized image (41') and the second resized image (42') being of the same definition; - prediction (37) of a depth associated with each first pixel (412) by the depth prediction model from the first resized image (41') and the first target set (422) and prediction of a depth associated with each second pixel (423) by the depth prediction model from the second resized image (42') and the second target set (413); - generation (38) of a third image (43) from the first resized image (41') by applying the transformation function to the first pixels (412) according to the depths associated with the first pixels (412) and generation of a fourth image (44) from the second resized image (42') by applying the inverse transformation function to the second pixels (423) as a function of the depths associated with the second pixels (423); - determination (39) of a first error associated with each first pixel (412) by comparison of pixels of the first resized image (41') and fourth image (44) and of a second error associated with each second pixel (423) by comparison of pixels of the second resized image (42') and third image (43); - learning (40) of the depth prediction model by minimizing a loss error determined from the first and second errors. A method according to claim 1, wherein the transformation function determines, for an input pixel: • spatial coordinates of an intermediate point by a reprojection model based on the coordinates of the input pixel in the first image (41) and a depth associated with the input pixel, and • coordinates of an output pixel in the second image (42) by a projection model based on the spatial coordinates of the intermediate point; the projection and reprojection models being implemented by a neural network learned during a calibration phase of the vision system.
3. A method according to claim 1 or 2, wherein said determined depth corresponds to an average depth of a depth prediction range.
4. A method according to any one of claims 1 to 3, wherein the first and second errors are photometric errors determined by the following function: L,(p) = Ep[(la) • \Hp)-î(p)\+a (14sSIM{l(p).ï(p)'})] With: • L*(p) the first reconstruction error denoted L^p), respectively the second reconstruction error denoted L2{p), p being a pixel defined by its coordinates in an image, • l(p) a value of the pixel p in the first resized image (41'), respectively second resized image (42'), * j(jp) a value of the pixel p in the fourth image (44), respectively third image (43), • SSIM a function which takes into account a local structure, and • a a weighting factor depending in particular on the type of environment.
5. A method according to any one of claims 1 to 4, wherein the loss error is determined by the following function: L^E^min^^^Cp) ) With: • £' the loss error, • L] ( p ) the first reconstruction error for a pixelp of the first resized image (21'), and • L2(p) the second reconstruction error for a pixelp of the second resized image (22') corresponding to the pixelp of the first resized image (21').
6. Computer program comprising instructions for carrying out the method according to any one of the preceding claims, when such instructions are executed by a processor.
7. Device (5) for determining depth by means of a vision system mounted in a vehicle (10), said device (5) comprising a memory (51) associated with at least one processor (50) configured for carrying out the steps of the method according to any one of claims 1 to 5.
8. Vehicle (10) comprising the device (5) according to claim 7.
Citation Information
Patent Citations
Multi-view geometry-based hazard detection for autonomous systems and applications
US11840238B2