Method For Training A Neural Network For Semantic Image Segmentation

20220383510 · 2022-12-01

Assignee

Inventors

Cpc classification

International classification

Abstract

The present invention relates to a method, a computer program, and an apparatus for training a neural network for semantic image segmentation. The invention further relates to an in-car control unit or a backend system, which make use of such a method or apparatus, and to a vehicle comprising such an in-car control unit. In some embodiments and in a first step, image data of a sequence of image frames are received. Then a frame-based evaluation of semantic segmentation predictions of one or more objects in individual image frames is performed. Furthermore, a sequence-based evaluation of temporal characteristics of semantic segmentation predictions of said one or more objects in at least two image frames is performed. The results of the frame-based evaluation and the sequence-based evaluation are combined.

Claims

1. Method for training a neural network for semantic image segmentation, comprising: receiving image data of a sequence of image frames; performing a frame-based evaluation of semantic segmentation predictions of one or more objects in individual image frames; performing a sequence-based evaluation of temporal characteristics of semantic segmentation predictions of said one or more objects in at least two image frames; and combining the results of the frame-based evaluation and the sequence-based evaluation.

2. The method of claim 1, wherein performing the sequence-based evaluation comprises: determining semantic segmentation predictions for said one or more objects in each of at least two sequential image frames; estimating displacements between the one or more objects in at least two sequential image frames; applying the estimated displacements to the semantic segmentation prediction of said one or more objects in a first of the at least two sequential image frames to generate an expected semantic segmentation prediction of said one or more objects in a second of the two sequential image frames; and evaluating the semantic segmentation prediction of the one or more objects in the second of the two sequential image frames based on the expected semantic segmentation prediction for the one or more objects in the second of the two sequential image frames.

3. The method of claim 2, wherein a temporal consistency loss is determined for evaluating the semantic segmentation prediction.

4. The method of claim 2, wherein performing a frame-based evaluation of semantic segmentation predictions of one or more objects in individual image frames comprises: determining semantic segmentation predictions for one of the two sequential image frames; and determining a cross-entropy loss for the semantic segmentation predictions for said one of the two sequential image frames.

5. The method of claim 4, wherein a total loss is determined by combining the results of the frame-based evaluation and the sequence-based evaluation.

6. The method of claim 5, wherein the total loss is a weighted sum of the cross-entropy loss and the temporal consistency loss.

7. The method of claim 6, wherein the total loss is given by
J.sub.t.sup.total=(1+α)J.sub.t.sup.CE+αJ.sub.t.sup.TC where J.sub.t.sup.total corresponds to the total loss, parameter α is the loss weight that controls the influence of the individual losses, J.sub.t.sup.CE is the cross-entropy loss and J.sub.t.sup.TC is the temporal consistency loss.

8. The method of claim 7, wherein loss weight parameter α is variable and may be adapted to address the trade-off between the sequence-based evaluation and the frame-based evaluation.

9. A computer program comprising instructions which, when executed by a computer, cause the computer to perform: receiving image data of a sequence of image frames; performing a frame-based evaluation of semantic segmentation predictions of one or more objects in individual image frames; performing a sequence-based evaluation of temporal characteristics of semantic segmentation predictions of said one or more objects in at least two image frames; and combining the results of the frame-based evaluation and the sequence-based evaluation.

10. An apparatus for training a neural network for semantic image segmentation, the apparatus comprising: an input configured to receive image data of two sequential image frames; means for performing a frame-based evaluation of semantic segmentation predictions of one or more objects in individual image frames; means for performing a sequence-based evaluation of temporal characteristics of semantic segmentation predictions of said one or more objects in at least two image frames; and means for combining the results of the frame-based evaluation and the sequence-based evaluation.

11. The apparatus of claim 10, wherein the means for performing the sequence-based evaluation comprises: a semantic segmentation module for determining semantic segmentation predictions for said one or more objects in each of at least two sequential image frames; an optical flow module for estimating displacements between the one or more objects in at least two sequential image frames; a prediction warping module for applying the estimated displacements to the semantic segmentation prediction of said one or more objects in a first of the at least two sequential image frames to generate an expected semantic segmentation prediction of said one or more objects in a second of the two sequential image frames; and a temporal consistency loss module for evaluating the semantic segmentation prediction of the one or more objects in the second of the two sequential image frames based on the expected semantic segmentation prediction for the one or more objects in the second of the two sequential image frames.

12. The apparatus of claim 11, wherein the means for performing a frame-based evaluation of semantic segmentation predictions of one or more objects in individual image frames comprises: a semantic segmentation module for determining semantic segmentation predictions for one of the two sequential image frames; and a cross entropy loss module for determining a cross-entropy loss for the semantic segmentation predictions for said one of the two sequential image frames.

13. An in-car control unit, wherein the in-car control unit comprises the apparatus of claim 10.

14. A backend system, wherein the backend system comprises the apparatus of claim 10.

15. A vehicle, wherein the vehicle comprises the in-car control unit of claim 13.

16. The method of claim 3, wherein performing a frame-based evaluation of semantic segmentation predictions of one or more objects in individual image frames comprises: determining semantic segmentation predictions for one of the two sequential image frames; and determining a cross-entropy loss for the semantic segmentation predictions for said one of the two sequential image frames.

17. The method of claim 16, wherein a total loss is determined by combining the results of the frame-based evaluation and the sequence-based evaluation.

18. The method of claim 17, wherein the total loss is a weighted sum of the cross-entropy loss and the temporal consistency loss.

19. The method of claim 18, wherein the total loss is given by
J.sub.t.sup.total=(1−α)J.sub.t.sup.CE+αJ.sub.t.sup.TC where J.sub.t.sup.total corresponds to the total loss, parameter α is the loss weight that controls the influence of the individual losses, J.sub.t.sup.CE is the cross-entropy loss and J.sub.t.sup.TC is the temporal consistency loss.

20. The method of claim 19, wherein loss weight parameter α is variable and may be adapted to address the trade-off between the sequence-based evaluation and the frame-based evaluation.

Description

BRIEF DESCRIPTION OF THE DRAWINGS

[0013] FIG. 1 schematically illustrates a method for training a neural network for semantic image segmentation according to some embodiments;

[0014] FIG. 2 schematically illustrates a block diagram of an apparatus according to some embodiments which implements a training strategy; and

[0015] FIG. 3 schematically illustrates a block diagram of a vehicle according to some embodiments.

DESCRIPTION

[0016] The details of one or more embodiments are set forth in the accompanying drawings and the description below. Other features will be apparent from the description, drawings, and from the claims.

[0017] In the following description of embodiments of the invention, specific details are described in order to provide a thorough understanding of the invention. However, it will be apparent to one of ordinary skill in the art that the invention may be practiced without these specific details. In other instances, well-known features have not been described in detail to avoid unnecessarily complicating the instant description.

[0018] In some embodiments, a method for training a neural network for semantic image segmentation comprises: [0019] receiving image data of a sequence of image frames; [0020] performing a frame-based evaluation of semantic segmentation predictions of one or more objects in individual image frames; [0021] performing a sequence-based evaluation of temporal characteristics of semantic segmentation predictions of said one or more objects in at least two image frames; and [0022] combining the results of the frame-based evaluation and the sequence-based evaluation.

[0023] Accordingly and in some embodiments, a computer program comprises instructions, which when executed a computer, cause the computer to perform the following steps for training a neural network for semantic image segmentation: [0024] receiving image data of a sequence of image frames; [0025] performing a frame-based evaluation of semantic segmentation predictions of one or more objects in individual image frames; [0026] performing a sequence-based evaluation of temporal characteristics of semantic segmentation predictions of said one or more objects in at least two image frames; and [0027] combining the results of the frame-based evaluation and the sequence-based evaluation.

[0028] The term computer is understood broadly. For example, it also includes workstations, distributed system, embedded devices, and other processor-based data processing devices, processors, processing circuits, without limitation.

[0029] The computer program may, for example, be made available for electronic retrieval or stored on a computer-readable storage medium.

[0030] In some embodiments, an apparatus for training a neural network for semantic image segmentation comprises: [0031] an input configured to receive image data of two sequential image frames; [0032] means for performing a frame-based evaluation of semantic segmentation predictions of one or more objects in individual image frames; [0033] means for performing a sequence-based evaluation of temporal characteristics of semantic segmentation predictions of said one or more objects in at least two image frames; and [0034] means for combining the results of the frame-based evaluation and the sequence-based evaluation.

[0035] The solution of the teachings herein provides an object-based training scheme for video sequences, which allows to jointly optimize both the accuracy of semantic segmentation predictions and its temporal consistency. Furthermore, the present solution may run in real-time in parallel to existing perception modules to detect unstable situations. This is particularly helpful for safety-critical applications such as highly automated driving.

[0036] In some embodiments, performing the sequence-based evaluation comprises determining semantic segmentation predictions for said one or more objects in each of at least two sequential image frames; estimating displacements between the one or more objects in at least two sequential image frames; applying the estimated displacements to the semantic segmentation prediction of said one or more objects in a first of the at least two sequential image frames to generate an expected semantic segmentation prediction of said one or more objects in a second of the two sequential image frames; and evaluating the semantic segmentation prediction of the one or more objects in the second of the two sequential image frames based on the expected semantic segmentation prediction for the one or more objects in the second of the two sequential image frames.

[0037] In some embodiments, a temporal consistency loss is determined for evaluating the semantic segmentation prediction.

[0038] In some embodiments, performing a frame-based evaluation of semantic segmentation predictions of one or more objects in individual image frames comprises determining semantic segmentation predictions for one of the two sequential image frames; and determining a cross-entropy loss for the semantic segmentation predictions for said one of the two sequential image frames.

[0039] In some embodiments, a total loss is determined by combining the results of the frame-based evaluation and the sequence-based evaluation.

[0040] In some embodiments, the total loss is a weighted sum of the cross-entropy loss and the temporal consistency loss.

[0041] In some embodiments, the total loss is given by J.sub.t.sup.total=(1−α)J.sub.t.sup.CE+αJ.sub.t.sup.TC, where J.sub.t.sup.total corresponds to the total loss, parameter α is the loss weight that controls the influence of the individual losses, J.sub.t.sup.CE is the cross-entropy loss and J.sub.t.sup.TC is the temporal consistency loss.

[0042] In some embodiments, the loss weight parameter α is variable and may be adapted to address the trade-off between the sequence-based evaluation and the frame-based evaluation.

[0043] Beneficially, an in-car control unit may comprise an apparatus according to the teachings herein or may be configured to perform a method according to the teachings herein. Such a system may for example be used in a vehicle, particularly an autonomous or semi-autonomous vehicle. The vehicle may be any type of vehicle, e.g., a car, a bus, a motorcycle, a commercial vehicle, for example a truck, an agricultural machinery, a construction machinery, a rail vehicle, etc. More generally, the teachings herein may be used in land vehicles, rail vehicles, watercrafts, and aircrafts.

[0044] Furthermore, a backend system may comprise an apparatus according to the teachings herein or may be configured to perform a method according to the teachings herein.

[0045] Further features of the present invention will become apparent from the following description and the appended claims in conjunction with the FIGS.

[0046] The present description illustrates the principles of the present disclosure. It will thus be appreciated that those skilled in the art will be able to devise various arrangements that, although not explicitly described or shown herein, embody the principles of the disclosure.

[0047] All examples and conditional language recited herein are intended for educational purposes to aid the reader in understanding the principles of the disclosure and the concepts contributed by the inventor to furthering the art, and are to be construed as being without limitation to such specifically recited examples and conditions.

[0048] Moreover, all statements herein reciting principles, aspects, and embodiments of the disclosure, as well as specific examples thereof, are intended to encompass both structural and functional equivalents thereof. Additionally, it is intended that such equivalents include both currently known equivalents as well as equivalents developed in the future, i.e., any elements developed that perform the same function, regardless of structure.

[0049] Thus, for example, it will be appreciated by those skilled in the art that the diagrams presented herein represent conceptual views of illustrative circuitry embodying the principles of the disclosure.

[0050] The functions of the various elements shown in the FIGS. may be provided through the use of dedicated hardware as well as hardware capable of executing software in association with appropriate software. When provided by a processor, the functions may be provided by a single dedicated processor, by a single shared processor, or by a plurality of individual processors, some of which may be shared. Moreover, explicit use of the term “processor” or “controller” should not be construed to refer exclusively to hardware capable of executing software, and may implicitly include, without limitation, digital signal processor (DSP) hardware, read only memory (ROM) for storing software, random access memory (RAM), and nonvolatile storage.

[0051] Other hardware, conventional and/or custom, may also be included. Similarly, any switches shown in the FIGS. are conceptual only. Their function may be carried out through the operation of program logic, through dedicated logic, through the interaction of program control and dedicated logic, or even manually, the particular technique being selectable by the implementer as more specifically understood from the context.

[0052] In the claims hereof, any element expressed as a means for performing a specified function is intended to encompass any way of performing that function including, for example, a combination of circuit elements that perform that function or software in any form, including, therefore, firmware, microcode or the like, combined with appropriate circuitry for executing that software to perform the function. The disclosure as defined by such claims resides in the fact that the functionalities provided by the various recited means are combined and brought together in the manner which the claims call for. It is thus regarded that any means that may provide those functionalities are equivalent to those shown herein.

[0053] FIG. 1 schematically illustrates a method for training a neural network based on an object-based training scheme for image sequences. For example, the images of the image sequence may correspond to images of a video sequence captured by a video camera. However, the images may also correspond to consecutive images of a LiDAR sensor, which uses ultraviolet, visible, or near infrared light to image objects or to images provided by another image-generating sensor.

[0054] Initially, the image data are received in a first step 10 of the method. For example, sequential image frames of a video sequence captured by a camera may be provided to the further steps of the inventive method, possibly after a video preprocessing to get rid of artifacts, suppress noise etc. Different kinds of cameras may be used for capturing the video sequence, such as 2D or 3D cameras or cameras using different parts of the light spectrum, as long as the frame rate of the used camera is sufficiently high. For a sufficiently high frame rate, there is only a continuous and therefore limited movement of objects across frames. Therefore, it is highly unlikely for objects to be present in one frame, then be absent in the next frame, and then abruptly be present again in the next.

[0055] The captured and possibly preprocessed image frames may be directly provided to the further steps in case of real-time processing, for example, when the method is implemented in a perception module of a vehicle with automated driving functions. However, in an offline mode the captured image frames may also by stored in a database and later on retrieved from this database for the inventive processing of the data.

[0056] In step 11, a frame-based evaluation of semantic segmentation predictions of one or more objects in individual image frames is performed. This is done as a supervised training which involves a loss function that penalizes incorrect predictions of the network when compared with ground truth labels. For a labelled data set of image frames semantic segmentation predictions are determined for the individual image frames and the semantic segmentation network is optimized using a cross-entropy (CE) loss.

[0057] In step 12, a sequence-based evaluation of temporal characteristics of semantic segmentation predictions of objects in at least two image frames is performed. For this purpose, semantic segmentation predictions are determined for two consecutive sequential image frames. Displacements between the image data of the two sequential image frames are estimated. For this purpose, optical flow approaches may be used to accurately model the movement of the objects between the two image frames. This maps both, the movement of the objects in the video and the movement of the camera.

[0058] The estimated displacements are applied to the semantic segmentation prediction of the first of the two sequential image frames to generate an expected semantic segmentation prediction for the second of the two sequential image frames. The semantic segmentation prediction of the second of the two sequential image frames is evaluated based on the expected semantic segmentation prediction for the second of the two sequential image frames. For example, the temporal consistency TC of the semantic segmentation prediction is calculated, which may be used as an optimization objective to improve the stability of the segmentation predictions. Temporally consistent, or in other words stable, predictions of semantic segmentation networks means here that movement of detected objects is limited.

[0059] Finally, in step 14, the results of the frame-based evaluation and the sequence-based evaluation are combined.

[0060] In the following, details and the theoretical background of the inventive method are described in more detail.

[0061] Supervised Semantic Segmentation Training:

[0062] As mentioned above, the supervised semantic segmentation training involves a loss function that penalizes the incorrect predictions of the network when compared with ground truth labels. This supervised training may be necessary for ensuring the accuracy of the semantic segmentation is maintained in the second step of the training process. The segmentation mask m.sub.t=(m.sub.t,i)∈S.sup.H×W of the network prediction at time t consists of elements

[00001] m { t , i } = arg max s S y t , i , s ,

where a class s∈S is assigned to each pixel i in the class score y.sub.t. Let m.sub.t,i ∈S.sup.H×W be the labelled ground truth in the dataset M corresponding to image x.sub.t, having the same dimensions as the segmentation mask m.sub.t. Likewise, y.sub.t∈{0,1}.sup.H×W×S is the one-hot encoded vector ground truth in three-dimensional tensor format. For supervised training, the network is optimized using the cross-entropy (CE) loss between the posterior probabilities of the network y.sub.t and the labels y.sub.t. Taking the mean over all pixels, the loss function for the image's posterior probabilities y.sub.t,i,s∈custom-character is defined as

[00002] J t CE = - 1 .Math. "\[LeftBracketingBar]" I .Math. "\[RightBracketingBar]" .Math. i I .Math. s S w s y _ t t , i , s .Math. log ( y t , i , s )

where |I|=H.Math.W is the number of pixels, and w.sub.s are the weights assigned to each class during training.

[0063] Unsupervised Temporal Consistency (TC) Loss:

[0064] A sequential and unlabeled dataset {tilde over (X)} with video sequences {tilde over (x)}.sub.1.sup.T=({tilde over (x)}.sub.1, {tilde over (x)}.sub.2, . . . , {tilde over (x)}.sub.t, . . . , {tilde over (x)}.sub.T) containing image frames {tilde over (x)}.sub.t at discrete time instants t∈T={1, 2, . . . , T} is defined. Optical flow functions are used to capture the notion of network prediction stability, and to estimate the apparent motion within the video sequence. Optical flow estimates the displacement of each pixel between the consecutive frames {tilde over (x)}.sub.t-1 and {tilde over (x)}.sub.t. The optical flow computed between {tilde over (x)}.sub.t-1 and {tilde over (x)}.sub.t is defined as a tensor u.sub.t-1.fwdarw.t∈U.sup.H×W, where U is the set of two-dimensional pixel-wise displacements Δ/h,Δw∈custom-character, representing the coordinate-wise shift of each pixel from {tilde over (x)}.sub.t-1 to {tilde over (x)}.sub.t.

[0065] Using the optical flow tensor u.sub.t-1.fwdarw.t generated by the optical flow block the prediction of the semantic segmentation network {tilde over (y)}.sub.t-1 is warped from time t−1 to time t. To do this, pixel coordinates for an image are defined as tensor p∈p.sup.H×W, where P=(h,w) is an index pair with h∈{1, . . . , H} and w∈{1, . . . , W}. Tensor p thus only contains the pixel-wise coordinates of a pixel in an image and does not carry any information about pixel intensity values.

[0066] The pixel-wise displacement vectors u.sub.t-1.fwdarw.t may be added to the original pixel positions p.sub.t-1 to receive a tensor


p.sub.t-1.fwdarw.t=p.sub.t-1+u.sub.1-1.fwdarw.t

which provides the projected pixel coordinates p.sub.t-1.fwdarw.t ∈U.sup.H×W Subsequently, the segmentation output {tilde over (y)}.sub.t-1 is shifted to pixel positions p.sub.t-1.fwdarw.t. As the pixel coordinates p.sub.t-1.fwdarw.t are non-integer numbers, nearest neighbour sampling nearest( ) may be used to obtain valid integer coordinates in a grid-like structure as in p.sub.t. That is, for the mapping {tilde over (y)}.sub.t-1 of to the flow-based estimate {tilde over (y)}.sub.t-1.fwdarw.t is obtained as


{tilde over (y)}.sub.t-1.fwdarw.t=nearest({tilde over (y)}.sub.t-1,p.sub.t-1.fwdarw.t)

[0067] Accordingly, {tilde over (y)}.sub.t-1.fwdarw.t is the expected prediction at time t based on the optical flow, conditioned on the change in the pair of inputs {tilde over (x)}.sub.t-1 and {tilde over (x)}.sub.t, which compensates for the movement of the camera and the objects in the consecutive frames. Ideally, for a good semantic segmentation model, the distance between the network output {tilde over (y)}.sub.t and the prediction based on the optical flow {tilde over (y)}.sub.t-1.fwdarw.t should be small. To enforce this, the temporal consistency metric interpretation described in S. Varghese et al. in “Unsupervised Temporal Consistency Metric for Video Segmentation in Highly-Automated Driving”, Proc. of CVPR—Workshops, pp. 336-337, Seattle, Wash., USA, June 2020, is applied, defining temporal consistency as the mean intersection-over-union (mIoU) of the two predictions {tilde over (y)}.sub.t and {tilde over (y)}.sub.t-1.fwdarw.t.

[0068] As per definition, the mIoU between the segmentation masks {tilde over (m)}.sub.t and {tilde over (m)}.sub.t-1.fwdarw.t is given as

[00003] mIoU ( m ~ t - 1 .fwdarw. "\[Rule]" t , m ~ t ) = 1 S .Math. s S TP s , t TP s , t + FP s , t + FN s , t

where TP.sub.s,t, FP.sub.s,t and FN.sub.s,t are the class-specific true positives, false positives and false negatives, respectively, which are calculated for {tilde over (m)}.sub.t, considering {tilde over (m)}.sub.t-1.fwdarw.t as reference.

[0069] A value of MIoU ({tilde over (m)}.sub.t-1.fwdarw.t,{tilde over (m)}.sub.t)=1 indicates that both overlap perfectly and the prediction of the network is completely stable. However, the mIoU metric cannot be optimized by gradient descent as set operations are non-differentiable. To be able to still use this as part of a loss function, the mIoU is approximated to ensure differentiability for gradient descent. An approximation of the mIoU is made using class probabilities {tilde over (y)}.sub.t-1.fwdarw.t and {tilde over (y)}.sub.t and this approximation is given by

[00004] = 1 S .Math. s S .Math. i I .Math. "\[LeftBracketingBar]" y t , s , i .Math. y ~ t , s , i .Math. "\[RightBracketingBar]" .Math. i I .Math. "\[LeftBracketingBar]" y t , s , i + y ~ t , s , i - ( y t , s , i .Math. y ~ t , s , i ) .Math. "\[RightBracketingBar]"

where y.sub.t,s,i′ and {tilde over (y)}.sub.t-1.fwdarw.t,s,i and custom-character=custom-character({tilde over (y)}.sub.t-1.fwdarw.t,{tilde over (y)}.sub.t).

[0070] The vector custom-character={custom-character, custom-character, . . . , custom-character} contains the class-wise stability of the predictions of the semantic segmentation network. This may be envisioned as connected components of the same semantic class that is being compared amongst each other. This loss therefore enforces the temporal stability based on individual classes or objects rather than focus on the pixel level which ignores this class-based dependency.

[0071] The temporal consistency (TC) loss between the prediction at time t and the warped prediction from time t−1 is then defined as


J.sub.t.sup.TC=1−custom-character

[0072] Note that since custom-character is larger for stable predictions, the loss may need to be minimized.

[0073] The temporal consistency loss J.sub.t.sup.TC therefore enforces the stability of the predictions of a semantic segmentation model by motion flow calculations, given sequential images in a self-supervised manner, i.e., without requiring labels.

[0074] Finally, the cross-entropy loss and the temporal consistency loss are combined as


J.sub.t.sup.total=(1−α)J.sub.t.sup.CE+αt.sup.TC

where α is the loss weight that controls the influence of the individual losses, and J.sub.t.sup.CE is computed on dataset X, while J.sub.t.sup.TC is computed on dataset {tilde over (X)}. A loss weight α=0 [0075] indicates that only J.sub.t.sup.CE is used and α=1 indicates that only J.sub.t.sup.TC is used.

[0076] In this way, a total loss J.sub.t.sup.total is determined for a second-stage training, i.e., a fine-tuning process for the training of the neural network.

[0077] FIG. 2 schematically illustrates a block diagram of an apparatus 20, which implements the inventive training strategy for enforcing temporal consistency in a self-supervised fashion for a semantic segmentation network. The separate modules shown in the FIG. may be controlled by a not depicted controller and may be embodied as dedicated hardware units. Of course, they may likewise be fully or partially combined into a single unit or implemented as software running on a processor, e.g. a CPU or a GPU.

[0078] A data source 21 comprises a sequential and unlabeled dataset with video sequences containing image frames. For example, the image frames could have been generated by a not shown video camera, which captures for a road scene a video sequence of image frames. The data source could be part of a local database.

[0079] For calculating the temporal consistency (TC) loss a pair of sequential image frames 22 corresponding to discrete time instants t−1 and t, respectively, are provided from the data source 21. More in detail, both image frames are fed to an optical flow module 23 and to a semantic segmentation module 24. The optical flow module 23 computes the optical flow 25 between the pair of sequential image frames 22 corresponding to the displacement of object pixels in these image frames and provides a calculated optical flow tensor to the subsequent prediction warping module 26.

[0080] In semantic segmentation module 24, semantic segmentation predictions are determined for the two sequential image frames. From the semantic segmentation module 24 the semantic segmentation prediction 27 of the first image frame at time instant t−1 is fed to the prediction warping module 26 while the semantic segmentation prediction of the second image frame at time instant t is fed to the temporal consistency (TC) loss module 28.

[0081] In the prediction warping module 26 the optical flow tensor calculated between the two sequential image frames is used to warp the prediction of the semantic segmentation from time t−1 to time t, resulting in an expected segmentation output, which is also fed to the temporal consistency (TC) loss module 28. In the temporal consistency (TC) loss module 28 the temporal consistency (TC) loss between the prediction at time t and the warped prediction from time t−1 is then calculated, and, if desired, averaged for all pairs of consecutive images in the considered video sequence to obtain a value for the mean temporal consistency. The calculated temporal consistency (TC) loss is provided to the total loss module 29 and then used in the training process together with the cross-entropy loss.

[0082] The cross-entropy loss is determined in a supervised training process. Image frames and ground truth labels for these image frames are provided from data sources 30 and 31, respectively. Data sources 30 and 31, and also data source 21, could be separate or integrated, for example into a single database.

[0083] In semantic segmentation module 24, the semantic segmentation prediction is performed for an image frame, which is fed to a cross entropy loss module 32. In cross entropy loss module 32 the semantic segmentation predictions are compared with the ground truth labels, which allows to optimize the network using a cross-entropy (CE) loss function that penalizes the incorrect predictions of the network when compared with ground truth labels. The cross-entropy (CE) loss is then also provided to the total loss module 29 and combined with the temporal consistency loss to determine the total loss.

[0084] FIG. 3 schematically shows a top view of a vehicle 40 in which automated driving or driver assistance functions may use the trained semantic image segmentation network in a perception system of a so-called observer. The vehicle 40 may for example be a passenger car or a truck.

[0085] The vehicle comprises an apparatus 20 for training the semantic image segmentation network as described above, which may be designed, for example, as a control unit of the vehicle 40 and may have one or more microcontrollers or microprocessors.

[0086] In addition, the vehicle comprises at least one vehicle camera 41, which captures the vehicle surroundings of the vehicle, e.g. a front camera, a rear camera and/or side cameras. The image or video data generated by the one or more vehicle cameras are fed via a digital data bus 42 in the vehicle to the apparatus 20, which processes the image data of the image frames as described above.

[0087] Furthermore, the vehicle may also have at least one further sensor 43 such as a Radar or LiDAR sensor, which allows to detect the vehicle surroundings and to determine the distance between the vehicle and objects in the vehicle surroundings. For localizing the vehicle, a navigation unit 44 may receive GPS signals and, possibly, also analyze high-precision map data and sensor-supported detection of landmarks in the vehicle's surroundings.

[0088] In the vehicle 40, a perception module 45 is also provided which detects, classifies and tracks objects in the vehicle surrounding based on the obtained segmentation data, sensor data and position data and provides the object information to an assistance unit 46.

[0089] Assistance unit 46 provides, based on this information and other data and parameter of the vehicle such as the current position, speed and acceleration of the vehicle, assistance functions such as automatic longitudinal and lateral guidance of the vehicle.

[0090] Furthermore, data about current weather or weather conditions may also be taken into account, which may be recorded by suitable sensors in the vehicle or may also be supplied to the vehicle externally. For example, the current outside temperature may be determined with an outside temperature sensor in the vehicle, while data on the current wind conditions are received via a mobile data radio link.

[0091] In addition, the vehicle may have further components, not shown in FIG. 3. For example, the vehicle may also be equipped with an on-board connectivity module, which may be used for mobile communication with a backend server for exchanging data.

LIST OF REFERENCE NUMERALS

[0092] 10 Receiving image data of two sequential image frames [0093] 11 Performing frame-based evaluation of semantic segmentation predictions [0094] 12 Performing sequence-based evaluation of temporal characteristics of semantic segmentation predictions [0095] 13 Combining results of frame-based evaluation and sequence-based evaluation [0096] 20 Apparatus [0097] 21 Data source [0098] 22 Sequential image frames [0099] 23 Optical flow module [0100] 24 Semantic segmentation module [0101] 25 Optical flow [0102] 26 Prediction warping module [0103] 27 Semantic segmentation prediction [0104] 28 Temporal consistency loss module [0105] 29 Total loss module [0106] 30, 31 Data source [0107] 32 Cross entropy loss module [0108] 40 Vehicle [0109] 41 Camera [0110] 42 Digital data bus [0111] 43 Further sensor [0112] 44 Navigation unit [0113] 45 Perception module [0114] 46 Assistance unit

[0115] The invention has been described in the preceding using various exemplary embodiments. Other variations to the disclosed embodiments may be understood and effected by those skilled in the art in practicing the claimed invention, from a study of the drawings, the disclosure, and the appended claims. In the claims, the word “comprising” does not exclude other elements or steps, and the indefinite article “a” or “an” does not exclude a plurality. A single processor, module or other unit or device may fulfil the functions of several items recited in the claims.

[0116] The term “exemplary” used throughout the specification means “serving as an example, instance, or exemplification” and does not mean “preferred” or “having advantages” over other embodiments.

[0117] The term “for example” used throughout the specification means “for example” or “for instance”.

[0118] The mere fact that certain measures are recited in mutually different dependent claims or embodiments does not indicate that a combination of these measures cannot be used to advantage. Any reference signs in the claims should not be construed as limiting the scope.